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:
parent
8c698c61d4
commit
a1ba38b882
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in a new issue