From 755431cdc9484b42a19bdc6d51806b9bcd48b0fb Mon Sep 17 00:00:00 2001 From: Yesterday's Voyage Date: Sun, 15 Feb 2009 19:27:23 +0000 Subject: [PATCH] Make more division checks safer (cherry picked from commit 60aeafc5b0bbfa8b1564be764a55e499c0182bad) --- src/destroy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2