From e5bde14f191d1778bf57fa33ff8872101d33ab0b Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 14 Jan 2025 21:06:12 -0500 Subject: [PATCH] Be smarter about ClearEmpty DB --- SabreTools.DatFiles/ItemDictionaryDB.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SabreTools.DatFiles/ItemDictionaryDB.cs b/SabreTools.DatFiles/ItemDictionaryDB.cs index da86ff8b..bb506f89 100644 --- a/SabreTools.DatFiles/ItemDictionaryDB.cs +++ b/SabreTools.DatFiles/ItemDictionaryDB.cs @@ -314,10 +314,10 @@ namespace SabreTools.DatFiles continue; // Convert to list of indices for ease of access - List itemsList = [.. items.Keys]; + List itemsList = [.. items.Values]; // If there are no non-blank items, remove - if (!itemsList.Exists(i => GetItem(i) != null && GetItem(i) is not Blank)) + if (!itemsList.Exists(i => i != null && i is not Blank)) #if NET40_OR_GREATER || NETCOREAPP _buckets.TryRemove(key, out _); #else