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.
This commit is contained in:
parent
648ea5900b
commit
9f4ce71a54
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue