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).
(cherry picked from commit 1ee02194c5)
This commit is contained in:
Markus Armbruster 2009-04-18 08:41:28 +02:00
parent 957f774a90
commit f571a37cde

View file

@ -227,7 +227,7 @@ tend_land(struct shpstr *tenderp, char *units)
if (!snxtitem(&targets, EF_SHIP,
player->argp[4], "Ship to be tended? "))
return RET_FAIL;
if (!check_land_ok(&land))
if (!check_ship_ok(tenderp) || !check_land_ok(&land))
return RET_SYN;
while (nxtitem(&targets, &target)) {
if (!player->owner &&