]> git.pond.sub.org Git - empserver/commitdiff
(guerrilla): Fix saturation of civilians (new in rev. 1.9). It
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 19 Mar 2005 15:57:41 +0000 (15:57 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 19 Mar 2005 15:57:41 +0000 (15:57 +0000)
created anti-uw, which made the next checksect() oops.

src/lib/update/revolt.c

index 0c42b9ee2d5fd2433b6c68162de62fb97a81c817..fa7e985b84a55dd07a9b0bbcaca0f86a428ca539 100644 (file)
@@ -341,7 +341,7 @@ guerrilla(struct sctstr *sp)
        n = civ / 20;
        civ -= n;
        if (civ > ITEM_MAX) {
-           uw = ITEM_MAX - civ;
+           uw = civ - ITEM_MAX;
            civ = ITEM_MAX;
        }
        sp->sct_item[I_CIVIL] = civ;