Skip to content

Commit

Permalink
Fix hash collision for ark string offset entries
Browse files Browse the repository at this point in the history
  • Loading branch information
PikminGuts92 committed Sep 20, 2020
1 parent b622683 commit cce8c0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Src/Core/Mackiloha/Ark/ArkFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ private void WriteClassicFileEntries(AwesomeWriter aw)
while (stringOffsets[hash] != 0)
{
hash++;
if (hash >= stringOffsets.Length) hash = 0;
if (hash >= stringOffsets.Length) hash = 1; // Index of 0 is reserved for empty string
}

stringOffsets[hash] = str.Value;
Expand Down

0 comments on commit cce8c0a

Please sign in to comment.