From 5af8fb18f01fde6d515e4ebbf15c40e1f9476afa Mon Sep 17 00:00:00 2001 From: NHOrus Date: Fri, 7 Jul 2017 23:14:46 +0300 Subject: [PATCH] Prevent access beyond boundaries of array on fallthrough --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.31.1