From 21f15219e82a66915552f6a2b5d4f8d9f23e5b6e Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Wed, 11 May 2016 09:33:52 -0700 Subject: [PATCH] Make this logic a little more solid --- DATabase/MergeDiff.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/DATabase/MergeDiff.cs b/DATabase/MergeDiff.cs index bdd46287..ecce50be 100644 --- a/DATabase/MergeDiff.cs +++ b/DATabase/MergeDiff.cs @@ -141,8 +141,7 @@ namespace SabreTools // For the AB mode-style diffs, get all required dictionaries and output with a new name // Loop through _inputs first and filter from all diffed roms to find the ones that have the same "System" string post = ""; - int j = 0; - foreach (string filename in _inputs) + for (int j = 0; j < _inputs.Count; j++) { Dictionary> sysDict = new Dictionary>(); foreach (string key in diffed.Keys) @@ -165,10 +164,8 @@ namespace SabreTools } } - post = " (" + Path.GetFileNameWithoutExtension(filename) + ")"; + post = " (" + Path.GetFileNameWithoutExtension(_inputs[j]) + ")"; Output.WriteToDatFromDict(_name + post, _desc + post, _version, _date, _cat, _author, _forceunpack, _old, _dedup, "", sysDict, _logger); - - j++; } // Get all entries that have External dupes