]> git.pond.sub.org Git - empserver/commitdiff
Fix tend land not to wipe out concurrent updates
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 18 Apr 2009 06:41:28 +0000 (08:41 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 18 Apr 2009 06:41:28 +0000 (08:41 +0200)
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

index a961fba58205e759b614bcc5bb72368973ba2893..b0abaf6b936888daa7872e97e4659e5aba34c491 100644 (file)
@@ -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 &&