]> git.pond.sub.org Git - empserver/commitdiff
Remove bogus correction of sct_mobil from sct_prewrite()
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 6 Sep 2008 12:09:59 +0000 (08:09 -0400)
committerMarkus Armbruster <armbru@pond.sub.org>
Tue, 9 Sep 2008 01:26:40 +0000 (21:26 -0400)
It used literal 127 instead of sect_mob_max, it didn't check the lower
bound, and it didn't report the corruption.  From Chainsaw 3.

Having *working* sanity checks there would be nice.  Left for another
day.

src/lib/subs/sect.c

index 70f93d1856e2a0fa70d2ccd7178f19579e9f4e69..0f8ef0adceeebc0534ac1dcff2b615ab20647cb7 100644 (file)
@@ -68,10 +68,6 @@ sct_prewrite(int id, void *ptr)
     bridge_damaged(sp);
     item_prewrite(sp->sct_item);
 
-    /* shouldn't happen, but... */
-    if (sp->sct_mobil > 127)
-       sp->sct_mobil = 0;
-
     mil = sp->sct_item[I_MILIT];
     civs = sp->sct_item[I_CIVIL];