Skip to content

Commit

Permalink
Fix a data center deserialization regression in a3233b9.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexrp committed Jan 6, 2024
1 parent a3233b9 commit 0c802a0
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void Populate()
{
// This has to happen after the names string table has been read.

for (var i = 0; i < _keys.Elements.Count; i++)
foreach (var raw in _keys.Elements)
{
string? GetName(int index)
{
Expand All @@ -44,10 +44,8 @@ public void Populate()
return name;
}

var raw = _keys.Elements[i];

_byIndex[i] = new(
GetName(raw.NameIndex1), GetName(raw.NameIndex2), GetName(raw.NameIndex3), GetName(raw.NameIndex4));
_byIndex.Add(new(
GetName(raw.NameIndex1), GetName(raw.NameIndex2), GetName(raw.NameIndex3), GetName(raw.NameIndex4)));
}
}

Expand Down

0 comments on commit 0c802a0

Please sign in to comment.