From 761a97292783b0f25ca7ab988c7a29a6145afb6e Mon Sep 17 00:00:00 2001 From: LJ Sonic Date: Sun, 17 Mar 2024 00:27:19 +0100 Subject: [PATCH] Fix R_AddSingleSpriteDef for short sprite names --- src/r_things.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/r_things.c b/src/r_things.c index 64f40c62e..ba3bf736a 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -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;