Skip to content

Commit

Permalink
Engine: fix unsafe comparison of bool with 0
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-mogilko committed Jan 30, 2025
1 parent e52ea38 commit 6181c77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Engine/ac/character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,7 +933,7 @@ void Character_SetSpeed(CharacterInfo *chaa, int xspeed, int yspeed) {

if ((xspeed == 0) || (yspeed == 0))
quit("!SetCharacterSpeedEx: invalid speed value");
if ((chaa->is_moving() > 0) && (loaded_game_file_version < kGameVersion_361))
if (chaa->is_moving() && (loaded_game_file_version < kGameVersion_361))
{
debug_script_warn("Character_SetSpeed: cannot change speed while walking");
return;
Expand Down

0 comments on commit 6181c77

Please sign in to comment.