fixed potential crash in moveIvy

This commit is contained in:
Zeno Rogue 2020-04-05 10:55:13 +02:00
parent bacdacbb7f
commit 9d292e59fc
1 changed files with 4 additions and 1 deletions

View File

@ -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)) {