Skip to content

Commit

Permalink
Merge pull request UnderminersTeam#1875 from UnderminersTeam/fix-emsize
Browse files Browse the repository at this point in the history
Fix EmSize being always parsed as 0, if a float
  • Loading branch information
Miepee authored Aug 18, 2024
2 parents 308e7f7 + 1f6fa62 commit 88eeb30
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 88eeb30

Please sign in to comment.