IntersectWith should be UnionWith

This commit is contained in:
Matt Nadareski
2024-12-06 12:46:58 -05:00
parent 9a363a0ed8
commit b6c6a0160b
4 changed files with 8 additions and 8 deletions

View File

@@ -151,9 +151,9 @@ namespace SabreTools.DatFiles
// Get the combined list of fields to remove
var fieldNames = new HashSet<string>();
if (itemFieldNames.ContainsKey(itemType))
fieldNames.IntersectWith(itemFieldNames[itemType]);
fieldNames.UnionWith(itemFieldNames[itemType]);
if (itemFieldNames.ContainsKey("item"))
fieldNames.IntersectWith(itemFieldNames["item"]);
fieldNames.UnionWith(itemFieldNames["item"]);
// If the field specifically contains Name, set it separately
if (fieldNames.Contains(Models.Metadata.Rom.NameKey))