Skip to content

Commit

Permalink
Only check top level HUD layout entry key/values for duplicates to pr…
Browse files Browse the repository at this point in the history
…event ToHashSet error later
  • Loading branch information
cooolbros committed Dec 20, 2023
1 parent c8b49df commit 09eba21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HUDMerger/Models/HUDLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public HUDLayout(string folderPath)
if (entry.Value is KeyValues values)
{
entries.TryAdd(entry, []);
foreach (KeyValue keyValue in values.ToHashSet())
foreach (KeyValue keyValue in new HashSet<KeyValue>(values, KeyValueComparer.KeyComparer))
{
int index = entries[entry].FindIndex((kv) => KeyValueComparer.KeyComparer.Equals(keyValue, kv));
if (index != -1)
Expand Down

0 comments on commit 09eba21

Please sign in to comment.