From: Yesterday's Voyage Date: Sun, 15 Feb 2009 19:27:23 +0000 (+0000) Subject: Make more division checks safer X-Git-Tag: 0.73p1~7 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=755431cdc9484b42a19bdc6d51806b9bcd48b0fb;p=cobramush.git Make more division checks safer (cherry picked from commit 60aeafc5b0bbfa8b1564be764a55e499c0182bad) --- diff --git a/src/destroy.c b/src/destroy.c index 0867036..0c23386 100644 --- a/src/destroy.c +++ b/src/destroy.c @@ -1056,7 +1056,7 @@ check_divisions(void) { /* make sure their division is a valid object */ if((!GoodObject(Division(i)) && Division(i) != NOTHING) - || IsGarbage(Division(i))) { + || (GoodObject(Division(i)) && IsGarbage(Division(i)))) { Division(i) = NOTHING; do_rawlog(LT_ERR, T("ERROR: Bad Division(#%d) set on object #%d"), Division(i), i);