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/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F224%2Fhead;p=open-adventure.git 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)