Make more division checks safer
authorYesterday's Voyage <startrekkin@startrekkin.net>
Sun, 15 Feb 2009 19:27:23 +0000 (19:27 +0000)
committerCobraMUSH <cobramush@nveid.com>
Tue, 4 Mar 2008 21:22:14 +0000 (21:22 +0000)
(cherry picked from commit 60aeafc5b0bbfa8b1564be764a55e499c0182bad)

src/destroy.c

index 0867036cb8d92a47eaf558eda0a040efa5d43012..0c23386b3475488af8ca285190a1bb64c33d9b35 100644 (file)
@@ -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);