From 478165f00c37fcacf96d4cbcb922ec162e4572c6 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 3 Mar 2018 06:37:16 +0000 Subject: [PATCH] Fix "too many sprites spawned" check git-svn-id: https://svn.eduke32.com/eduke32@6716 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 16d2ba1ee..2eb170bd3 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -1301,7 +1301,7 @@ int32_t A_InsertSprite(int16_t whatsect,int32_t s_x,int32_t s_y,int32_t s_z,int1 { int32_t i = Net_IsRelevantStat(s_ss) ? Net_InsertSprite(whatsect, s_ss) : insertsprite(whatsect, s_ss); - if (EDUKE32_PREDICT_FALSE(i) < 0) + if (EDUKE32_PREDICT_FALSE((unsigned)i >= MAXSPRITES)) { G_DumpDebugInfo(); OSD_Printf("Failed spawning pic %d spr from pic %d spr %d at x:%d,y:%d,z:%d,sect:%d\n",