Prevent access beyond boundaries of array on fallthrough

This commit is contained in:
NHOrus 2017-07-07 23:14:46 +03:00
parent 9100c14d2c
commit 5af8fb18f0

4
main.c
View file

@ -648,8 +648,8 @@ static void playermove( int motion)
/* else fall through */ /* else fall through */
} }
/* YAML [with OBJ] clause */ /* YAML [with OBJ] clause */
if (TOTING(condarg1) || else if (TOTING(condarg1) ||
(condtype == cond_with && AT(condarg1))) (condtype == cond_with && AT(condarg1)))
break; break;
/* else fall through to check [not OBJ STATE] */ /* else fall through to check [not OBJ STATE] */
} else if (game.prop[condarg1] != condarg2) } else if (game.prop[condarg1] != condarg2)