From 9f4ce71a54db61a899a9918a277178476491458b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 26 Jul 2008 21:13:09 -0400 Subject: [PATCH] Fail ltend command properly when it gets aborted The old code didn't return RET_SYN when aborting at the prompts for the third and fourth argument. While there, return RET_SYN instead of RET_OK when the tender can't hold the commodity to be tended. --- src/lib/commands/lten.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/commands/lten.c b/src/lib/commands/lten.c index f5146980..3aaba712 100644 --- a/src/lib/commands/lten.c +++ b/src/lib/commands/lten.c @@ -77,7 +77,7 @@ ltend(void) continue; if ((p = getstarg(player->argp[3], "Amount to transfer? ", buf)) == 0) - break; + return RET_SYN; if (!check_ship_ok(&tender)) return RET_FAIL; if ((amt = atoi(p)) == 0) @@ -92,12 +92,12 @@ ltend(void) if (maxtender == 0) { pr("A %s cannot hold any %s\n", mchr[(int)tender.shp_type].m_name, ip->i_name); - break; + return RET_FAIL; } if (!snxtitem(&targets, EF_LAND, getstarg(player->argp[4], "Units to be tended? ", buf))) - break; + return RET_SYN; if (!check_ship_ok(&tender)) return RET_FAIL; total = 0;