savemem:: removed some more potential crashes

This commit is contained in:
Zeno Rogue committed 2022-07-17 14:41:57 +02:00
1 parent 7c1d083afa
commit 6225fd38e8
4 files changed
+7 -4

No files matched your search

+1 -1
View File
@@ -2539,7 +2539,7 @@ EX int cellcolor(cell *c) {
int taildist(cell *c) {
int s = 0;
while(s < 1000 && c->mondir != NODIR && isWorm(c->monst)) {
while(s < 1000 && c && c->mondir != NODIR && isWorm(c->monst)) {
s++; c = c->move(c->mondir);
}
return s;