From 9d292e59fc9aa70547812af47fe0a8df4c5d162b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 5 Apr 2020 10:55:13 +0200 Subject: [PATCH] fixed potential crash in moveIvy --- monstermove.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/monstermove.cpp b/monstermove.cpp index 298b63b8..650abb01 100644 --- a/monstermove.cpp +++ b/monstermove.cpp @@ -979,9 +979,12 @@ EX void moveivy() { while(c->monst != moIvyRoot) { if(!isIvy(c->monst)) { raiseBuggyGeneration(c, "that's not an Ivy!"); + break; } - if(c->mondir == NODIR) + if(c->mondir == NODIR) { raiseBuggyGeneration(c, "wrong mondir!"); + break; + } forCellIdEx(c2, j, c) { if(canAttack(c, c->monst, c2, c2->monst, AF_ONLY_FRIEND | AF_GETPLAYER)) {