fixed potential crash in moveIvy
This commit is contained in:
parent
bacdacbb7f
commit
9d292e59fc
|
@ -979,9 +979,12 @@ EX void moveivy() {
|
||||||
while(c->monst != moIvyRoot) {
|
while(c->monst != moIvyRoot) {
|
||||||
if(!isIvy(c->monst)) {
|
if(!isIvy(c->monst)) {
|
||||||
raiseBuggyGeneration(c, "that's not an Ivy!");
|
raiseBuggyGeneration(c, "that's not an Ivy!");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if(c->mondir == NODIR)
|
if(c->mondir == NODIR) {
|
||||||
raiseBuggyGeneration(c, "wrong mondir!");
|
raiseBuggyGeneration(c, "wrong mondir!");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
forCellIdEx(c2, j, c) {
|
forCellIdEx(c2, j, c) {
|
||||||
if(canAttack(c, c->monst, c2, c2->monst, AF_ONLY_FRIEND | AF_GETPLAYER)) {
|
if(canAttack(c, c->monst, c2, c2->monst, AF_ONLY_FRIEND | AF_GETPLAYER)) {
|
||||||
|
|
Loading…
Reference in New Issue