Truncate shortname checks so names past the 8-character limit still get picked up

Missed a spot with the WAD search optimizations, it seems...
This commit is contained in:
yamamama 2026-04-26 07:45:48 -04:00
parent 8c698c61d4
commit a1ba38b882

View file

@ -1340,7 +1340,11 @@ UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump)
if (!TestValidLump(wad, 0))
return INT16_MAX;
namelen = strlen(name);
// Name = SHORTNAME. Truncate/move the string to something that has a max of 8 characters.
// Will this cause lumpname/lumphash collisions? Of course it will! But we need it for
// SRB2Kart compatibility, so...
namelen = min(strlen(name), 8);
hash = W_HashLumpName(name, namelen); // Not a mistake, legacy system for short lumpnames
//