Fix tend land not to wipe out concurrent updates
Fix tend_land() to bail out if the tender changed while tend_land() slept for the last argument (receiving ship).
This commit is contained in:
parent
1329c0e544
commit
1ee02194c5
1 changed files with 1 additions and 1 deletions
|
@ -228,7 +228,7 @@ tend_land(struct shpstr *tenderp, char *units)
|
||||||
if (!snxtitem(&targets, EF_SHIP,
|
if (!snxtitem(&targets, EF_SHIP,
|
||||||
player->argp[4], "Ship to be tended? "))
|
player->argp[4], "Ship to be tended? "))
|
||||||
return RET_FAIL;
|
return RET_FAIL;
|
||||||
if (!check_land_ok(&land))
|
if (!check_ship_ok(tenderp) || !check_land_ok(&land))
|
||||||
return RET_SYN;
|
return RET_SYN;
|
||||||
while (nxtitem(&targets, &target)) {
|
while (nxtitem(&targets, &target)) {
|
||||||
if (!player->owner &&
|
if (!player->owner &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue