From: Markus Armbruster Date: Sat, 6 Sep 2008 12:09:59 +0000 (-0400) Subject: Remove bogus correction of sct_mobil from sct_prewrite() X-Git-Tag: v4.3.17~70 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=e31ba545af4209b8c61868e291e44b5f80ce7c15 Remove bogus correction of sct_mobil from sct_prewrite() 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. --- diff --git a/src/lib/subs/sect.c b/src/lib/subs/sect.c index 70f93d185..0f8ef0adc 100644 --- a/src/lib/subs/sect.c +++ b/src/lib/subs/sect.c @@ -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];