diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index 69704e93d..d6fba9e06 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -1872,8 +1872,15 @@ void DrawObject(int x, int y, int ox, int oy, BOOL pre, int CelSkip, int CelCap) } /// ASSERT: assert((unsigned char)bv < MAXOBJECTS); +#ifdef HELLFIRE + if (bv >= MAXOBJECTS) + return; + if (bv < 0) + return; +#else if ((BYTE)bv >= MAXOBJECTS) return; +#endif pCelBuff = object[bv]._oAnimData; if (!pCelBuff) {