]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/retreat.c
(marc, navi, retreat_ship1, retreat_land1): Treat any negative value
[empserver] / src / lib / subs / retreat.c
index f8f3f6bbec86284bc4cc0c0cd14f11374ad0f918..5a17ae9290c94a91a8591e0c1b64bd22eeca7f7a 100644 (file)
@@ -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++;