From: NHOrus Date: Fri, 7 Jul 2017 20:14:46 +0000 (+0300) Subject: Prevent access beyond boundaries of array on fallthrough X-Git-Tag: 2017-07-10~28 X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=commitdiff_plain;h=5af8fb18f01fde6d515e4ebbf15c40e1f9476afa Prevent access beyond boundaries of array on fallthrough --- diff --git a/main.c b/main.c index 0b36639..200c77e 100644 --- a/main.c +++ b/main.c @@ -648,8 +648,8 @@ static void playermove( int motion) /* else fall through */ } /* YAML [with OBJ] clause */ - if (TOTING(condarg1) || - (condtype == cond_with && AT(condarg1))) + else if (TOTING(condarg1) || + (condtype == cond_with && AT(condarg1))) break; /* else fall through to check [not OBJ STATE] */ } else if (game.prop[condarg1] != condarg2)