Use strlen instead of sizeof()-1

This commit is contained in:
NepDisk 2025-12-04 14:41:28 -05:00
parent 7820a02bd4
commit c879991594

View file

@ -1297,7 +1297,7 @@ UINT16 W_CheckNumForNamePwad(const char *name, UINT16 wad, UINT16 startlump)
continue;
if (lump_p->hash.name != hash)
continue;
if (strncasecmp(lump_p->name, name, sizeof(name) - 1))
if (strncasecmp(lump_p->name, name, strlen(name)))
continue;
return i;
}