Ensure the string to be hashed is terminated.

This commit is contained in:
Bill Currie 2010-10-10 18:21:30 +09:00
parent ff94a0f76a
commit f7412e8866

View file

@ -61,11 +61,12 @@ static __attribute__ ((used)) const char rcsid[] =
static uintptr_t
wad_get_hash (void *l, void *unused)
{
char name[16];
char name[17];
int i;
for (i = 0; i < 16; i++)
name[i] = tolower (((lumpinfo_t *) l)->name[i]);
name[16] = 0;
return Hash_String (name);
}