mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-04 10:30:52 +00:00
Ensure the string to be hashed is terminated.
This commit is contained in:
parent
ff94a0f76a
commit
f7412e8866
1 changed files with 2 additions and 1 deletions
|
@ -61,11 +61,12 @@ static __attribute__ ((used)) const char rcsid[] =
|
||||||
static uintptr_t
|
static uintptr_t
|
||||||
wad_get_hash (void *l, void *unused)
|
wad_get_hash (void *l, void *unused)
|
||||||
{
|
{
|
||||||
char name[16];
|
char name[17];
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 16; i++)
|
for (i = 0; i < 16; i++)
|
||||||
name[i] = tolower (((lumpinfo_t *) l)->name[i]);
|
name[i] = tolower (((lumpinfo_t *) l)->name[i]);
|
||||||
|
name[16] = 0;
|
||||||
return Hash_String (name);
|
return Hash_String (name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue