From e31ba545af4209b8c61868e291e44b5f80ce7c15 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 6 Sep 2008 08:09:59 -0400 Subject: [PATCH] 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. --- src/lib/subs/sect.c | 4 ---- 1 file changed, 4 deletions(-) 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]; -- 2.43.0