From: Yesterday's Voyage Date: Sun, 15 Feb 2009 19:27:23 +0000 (+0000) Subject: Make more division checks safer X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=60aeafc5b0bbfa8b1564be764a55e499c0182bad;p=cobramush.git Make more division checks safer --- 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);