From: Yesterday's Voyage Date: Sun, 15 Feb 2009 19:26:50 +0000 (+0000) Subject: Make some division checks safer X-Git-Tag: 0.73p1~8 X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=0de01bd32e6b03eb370a74391b411b5d442d5d12;p=cobramush.git Make some division checks safer (cherry picked from commit 5534cd3af85f618246a4b15c8e83b8fe92e1a082) --- diff --git a/hdrs/dbdefs.h b/hdrs/dbdefs.h index df23cc0..cfd6a94 100644 --- a/hdrs/dbdefs.h +++ b/hdrs/dbdefs.h @@ -66,7 +66,7 @@ extern dbref first_free; /* pointer to free list */ #define IsRoom(x) (!!(Typeof(x) & TYPE_ROOM)) #define IsThing(x) (!!(Typeof(x) & TYPE_THING)) #define IsExit(x) (!!(Typeof(x) & TYPE_EXIT)) -#define IsDivision(x) (!!(Typeof(x) & TYPE_DIVISION)) +#define IsDivision(x) (GoodObject(x) && !!(Typeof(x) & TYPE_DIVISION)) #define IsMasterDivision(x) (GoodObject(x) && IsDivision(x) && Division(x) == NOTHING) /* Was Destroyed() */