diff --git a/polymer/eduke32/build/src/engine.c b/polymer/eduke32/build/src/engine.c index 01108203a..339fabd04 100644 --- a/polymer/eduke32/build/src/engine.c +++ b/polymer/eduke32/build/src/engine.c @@ -5282,7 +5282,7 @@ static void drawsprite(int32_t snum) spritenum = tspr->owner; cstat = tspr->cstat; - if (tilenum < 0 || tilenum >= MAXSPRITES) return; + if (tilenum < 0 || tilenum >= MAXTILES) return; if ((cstat&48)==48) vtilenum = tilenum; // if the game wants voxels, it gets voxels else if ((cstat&48)!=48 && (usevoxels) && (tiletovox[tilenum] != -1)