From 9afa748c60635c891bf802a28317b657cf7eb4c8 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Fri, 9 Mar 2018 10:01:46 -0800 Subject: [PATCH] [DatItem] Do better nodump checks --- SabreTools.Library/DatItems/DatItem.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SabreTools.Library/DatItems/DatItem.cs b/SabreTools.Library/DatItems/DatItem.cs index af86dd3b..778c69f4 100644 --- a/SabreTools.Library/DatItems/DatItem.cs +++ b/SabreTools.Library/DatItems/DatItem.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using SabreTools.Library.Data; using SabreTools.Library.DatFiles; @@ -694,8 +695,11 @@ namespace SabreTools.Library.DatItems continue; } - // If it's the first rom in the list, don't touch it - if (outfiles.Count == 0) + // If it's the first non-nodump rom in the list, don't touch it + if (outfiles.Count == 0 + || outfiles.Count == outfiles.Count(i => + (i.Type == ItemType.Rom && ((Rom)i).ItemStatus == ItemStatus.Nodump) + || (i.Type == ItemType.Disk && ((Disk)i).ItemStatus == ItemStatus.Nodump))) { outfiles.Add(file); continue;