Skip to content

Commit

Permalink
Fix EmSize being always parsed as 0, if a float
Browse files Browse the repository at this point in the history
  • Loading branch information
colinator27 committed Aug 17, 2024
1 parent 308e7f7 commit 1f6fa62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UndertaleModLib/Models/UndertaleFont.cs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ public void Unserialize(UndertaleReader reader)
// since the float is always written negated, it has the first bit set.
if ((readEmSize & (1 << 31)) != 0)
{
float fsize = -BitConverter.ToSingle(BitConverter.GetBytes(EmSize), 0);
float fsize = -BitConverter.ToSingle(BitConverter.GetBytes(readEmSize), 0);
EmSize = fsize;
EmSizeIsFloat = true;
}
Expand Down

0 comments on commit 1f6fa62

Please sign in to comment.