From 1ee02194c517e773888f2644c5dde30ac14f6f20 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 18 Apr 2009 08:41:28 +0200 Subject: [PATCH] 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). --- src/lib/commands/tend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/commands/tend.c b/src/lib/commands/tend.c index a961fba58..b0abaf6b9 100644 --- a/src/lib/commands/tend.c +++ b/src/lib/commands/tend.c @@ -228,7 +228,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 && -- 2.43.0