Skip to content

Draft: Fix infinite loop when Force Shield has 256 HP

Sparkette requested to merge flarn2006/SRB2:forcehp_hud_fix into next

I set powers[pw_shield] to SH_FORCE|SH_FORCEHP just to see what that would look like in the HUD, and the game just froze. A quick look with GDB told me it was in an infinite loop, as it was checking i <= 255 when i is a UINT8. So I just changed it to a UINT16, which I verified fixes the bug.

Merge request reports

Loading