From 9a7be539fb59a79f92f39dc72fbed11a15423f5c Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Mon, 19 Sep 2016 22:01:16 -0700 Subject: [PATCH] [DatFile] Add temporary fix with logging statement --- SabreTools.Helper/Objects/DatObjects/DatFile.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SabreTools.Helper/Objects/DatObjects/DatFile.cs b/SabreTools.Helper/Objects/DatObjects/DatFile.cs index 87586bd5..f3a83809 100644 --- a/SabreTools.Helper/Objects/DatObjects/DatFile.cs +++ b/SabreTools.Helper/Objects/DatObjects/DatFile.cs @@ -2759,6 +2759,13 @@ namespace SabreTools.Helper { foreach (DatItem rom in roms) { + // There's odd cases where there are items with System ID < 0. Skip them for now + if (rom.SystemID < 0) + { + logger.Warning("Item found with a <0 SystemID: " + rom.Name); + continue; + } + if (outDats[rom.SystemID].Files.ContainsKey(key)) { outDats[rom.SystemID].Files[key].Add(rom);