(marc, navi, retreat_ship1, retreat_land1): Treat any negative value
of chkdir() as failure, not just -1.
This commit is contained in:
parent
dfa56cb0ef
commit
1fe759dc1e
3 changed files with 4 additions and 4 deletions
|
@ -243,7 +243,7 @@ retreat_ship1(struct shpstr *sp, s_char code, int orig)
|
|||
}
|
||||
dir = chkdir(sp->shp_rpath[0], DIR_STOP, DIR_VIEW);
|
||||
memmove(sp->shp_rpath, sp->shp_rpath+1, sizeof(sp->shp_rpath) - 1);
|
||||
if (dir == -1)
|
||||
if (dir < 0)
|
||||
continue;
|
||||
if (dir == DIR_STOP)
|
||||
stopping++;
|
||||
|
@ -469,7 +469,7 @@ retreat_land1(struct lndstr *lp, s_char code, int orig)
|
|||
}
|
||||
dir = chkdir(lp->lnd_rpath[0], DIR_STOP, DIR_VIEW);
|
||||
memmove(lp->lnd_rpath, lp->lnd_rpath+1, sizeof(lp->lnd_rpath) - 1);
|
||||
if (dir == -1)
|
||||
if (dir < 0)
|
||||
continue;
|
||||
if (dir == DIR_STOP)
|
||||
stopping++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue