Make sure unterminated lump names don't cause propblems when comparing.

This commit is contained in:
Bill Currie 2010-10-10 18:31:14 +09:00
parent f7412e8866
commit 694a405578
1 changed files with 2 additions and 2 deletions

View File

@ -73,8 +73,8 @@ wad_get_hash (void *l, void *unused)
static int
wad_compare (void *la, void *lb, void *unused)
{
return strcasecmp (((lumpinfo_t *) la)->name,
((lumpinfo_t *) lb)->name) == 0;
return strncasecmp (((lumpinfo_t *) la)->name,
((lumpinfo_t *) lb)->name, 16) == 0;
}
VISIBLE wad_t *