[DatFile] Be more mindful of item types

This commit is contained in:
Matt Nadareski
2017-01-26 20:59:11 -08:00
parent 52c50f54a7
commit a0adcc039f
2 changed files with 36 additions and 22 deletions

View File

@@ -524,12 +524,15 @@ namespace SabreTools.Helper.Dats
foreach (string key in Keys)
{
List<DatItem> roms = this[key];
foreach (Rom rom in roms)
foreach (DatItem rom in roms)
{
if (rom.SourceID == 99)
{
found = true;
matched.Add(rom.Size + "-" + rom.CRC, rom);
if (rom.Type == ItemType.Disk || rom.Type == ItemType.Rom)
{
matched.Add(((Disk)rom).SHA1, rom);
}
}
}
}