Skip to content

Commit

Permalink
fix writing invalid packages
Browse files Browse the repository at this point in the history
  • Loading branch information
LazyDuchess committed Jun 30, 2024
1 parent 974f794 commit 5c8e7a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Assets/Scripts/OpenTS2/Files/Formats/DBPF/DBPFFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,9 @@ public void Serialize(Stream stream)
{
var lastPosition = stream.Position;
stream.Position = entryOffset[i] + 4;
writer.Write(entryData.Length);
writer.Write(compressedEntryData.Length);
stream.Position = lastPosition;
writer.Write(compressedEntryData, 0, compressedEntryData.Length);
}
else
{
Expand Down

0 comments on commit 5c8e7a2

Please sign in to comment.