From 50b5b9d3f19bffb5bac6e05a7a809ecc1d3aa94c Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Thu, 9 Jan 2025 20:45:26 -0500 Subject: [PATCH] Ignore empty lists in ResolveNames/DB --- SabreTools.DatFiles/DatFile.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/SabreTools.DatFiles/DatFile.cs b/SabreTools.DatFiles/DatFile.cs index 697b84c1..6fb1ec9a 100644 --- a/SabreTools.DatFiles/DatFile.cs +++ b/SabreTools.DatFiles/DatFile.cs @@ -459,6 +459,10 @@ namespace SabreTools.DatFiles /// A List of DatItem objects representing the renamed items protected internal List ResolveNames(List items) { + // Ignore empty lists + if (items.Count == 0) + return []; + // Create the output list List output = []; @@ -554,6 +558,10 @@ namespace SabreTools.DatFiles /// A List of DatItem objects representing the renamed items protected internal List> ResolveNamesDB(List> mappings) { + // Ignore empty lists + if (mappings.Count == 0) + return []; + // Create the output dict List> output = [];