diff --git a/src/lib/subs/move.c b/src/lib/subs/move.c index e1b03632..95ac4e82 100644 --- a/src/lib/subs/move.c +++ b/src/lib/subs/move.c @@ -111,7 +111,7 @@ move_ground(struct sctstr *start, struct sctstr *end, curx = start->sct_x; cury = start->sct_y; total_mcost = 0.0; - if (getsect(curx, cury, §) < 0) { + if (!getsect(curx, cury, §)) { logerror("move_path: getsect %d,%d", curx, cury); return -1; } @@ -191,7 +191,7 @@ move_ground(struct sctstr *start, struct sctstr *end, */ tmpx = curx + diroff[dir][0]; tmpy = cury + diroff[dir][1]; - if (getsect(tmpx, tmpy, &next) < 0) { + if (!getsect(tmpx, tmpy, &next)) { pr("You can't go there...\n"); *movstr = 0; continue;