From 1503209d99878df29da48892557771ecf8a2395f Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 14 Dec 2017 13:55:15 -0800 Subject: [PATCH] [DatFile] Non-Rom/Disk don't need to get checked for dupes --- SabreTools.Library/DatFiles/DatFile.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SabreTools.Library/DatFiles/DatFile.cs b/SabreTools.Library/DatFiles/DatFile.cs index c48d2b63..c163c2a6 100644 --- a/SabreTools.Library/DatFiles/DatFile.cs +++ b/SabreTools.Library/DatFiles/DatFile.cs @@ -1767,6 +1767,13 @@ namespace SabreTools.Library.DatFiles List newDatItems = new List(); foreach (DatItem datItem in datItems) { + // If we have something other than a Rom or Disk, then this doesn't do anything + if (datItem.Type != ItemType.Disk && datItem.Type != ItemType.Rom) + { + newDatItems.Add((DatItem)datItem.Clone()); + continue; + } + List dupes = datItem.GetDuplicates(this, sorted: true); DatItem newDatItem = (DatItem)datItem.Clone();