Skip to content

Commit

Permalink
Optimized "UndertaleChunkVARI" unserialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
VladiStep committed Jan 29, 2023
1 parent f227a49 commit 735e2fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions UndertaleModLib/UndertaleChunks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@ internal override void UnserializeChunk(UndertaleReader reader)
else
varLength = 12;
List.Clear();
List.Capacity = (int)(Length / varLength);
while (reader.Position + varLength <= startPosition + Length)
List.Add(reader.ReadUndertaleObject<UndertaleVariable>());
}
Expand Down

0 comments on commit 735e2fc

Please sign in to comment.