Fix R_AddSingleSpriteDef for short sprite names

This commit is contained in:
LJ Sonic 2024-03-17 00:27:19 +01:00
parent 4ebda932bb
commit 761a972927

View file

@ -400,7 +400,7 @@ boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef, UINT16
{
// For long sprites, the startlump-endlump range only includes
// relevant lumps, so no check needed in that case
if (longname || !memcmp(lumpinfo[l].name, sprname, 4))
if (longname || (strlen(sprname) == 4 && !memcmp(lumpinfo[l].name, sprname, 4)))
{
INT16 width, height;
INT16 topoffset, leftoffset;