diff --git a/src/lib/commands/bomb.c b/src/lib/commands/bomb.c index e17f411c..ddfb3d2b 100644 --- a/src/lib/commands/bomb.c +++ b/src/lib/commands/bomb.c @@ -108,8 +108,7 @@ bomb(void) return RET_SYN; ax = ap_sect.sct_x; ay = ap_sect.sct_y; - if (!getpath(flightpath, player->argp[5], ax, ay, 0, 0, MOB_FLY) - || *flightpath == 0) + if (!getpath(flightpath, player->argp[5], ax, ay, 0, 0, MOB_FLY)) return RET_SYN; tx = ax; ty = ay; diff --git a/src/lib/commands/drop.c b/src/lib/commands/drop.c index 330f9cd4..cb6273b2 100644 --- a/src/lib/commands/drop.c +++ b/src/lib/commands/drop.c @@ -61,8 +61,7 @@ drop(void) return RET_SYN; ax = ap_sect.sct_x; ay = ap_sect.sct_y; - if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY) - || *flightpath == 0) + if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY)) return RET_SYN; tx = ax; ty = ay; diff --git a/src/lib/commands/fly.c b/src/lib/commands/fly.c index f861b331..c7f7ca64 100644 --- a/src/lib/commands/fly.c +++ b/src/lib/commands/fly.c @@ -65,8 +65,7 @@ fly(void) return RET_SYN; ax = ap_sect.sct_x; ay = ap_sect.sct_y; - if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY) - || *flightpath == 0) + if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY)) return RET_SYN; tx = ax; ty = ay; diff --git a/src/lib/commands/para.c b/src/lib/commands/para.c index da5ac9ac..85cdb54d 100644 --- a/src/lib/commands/para.c +++ b/src/lib/commands/para.c @@ -64,8 +64,7 @@ para(void) return RET_SYN; ax = ap_sect.sct_x; ay = ap_sect.sct_y; - if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY) - || *flightpath == 0) + if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY)) return RET_SYN; tx = ax; ty = ay; diff --git a/src/lib/commands/reco.c b/src/lib/commands/reco.c index 381bbf54..bee553ac 100644 --- a/src/lib/commands/reco.c +++ b/src/lib/commands/reco.c @@ -63,8 +63,7 @@ reco(void) return RET_SYN; ax = ap_sect.sct_x; ay = ap_sect.sct_y; - if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY) - || *flightpath == 0) + if (!getpath(flightpath, player->argp[4], ax, ay, 0, 0, MOB_FLY)) return RET_SYN; tx = ax; ty = ay; diff --git a/src/lib/subs/paths.c b/src/lib/subs/paths.c index f1875964..7de13c18 100644 --- a/src/lib/subs/paths.c +++ b/src/lib/subs/paths.c @@ -143,7 +143,7 @@ more: break; } if (dir == DIR_STOP) { - p[1] = 0; + *p = 0; return buf; } ++p; @@ -170,7 +170,7 @@ more: strcpy(p, bp); if (*bp) goto more; - return buf; + return buf[0] ? buf : NULL; } /*