From 3f082680385fb3857d001af8502ff1ad5a692536 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Sun, 10 Oct 2010 18:31:14 +0900 Subject: [PATCH] Make sure unterminated lump names don't cause propblems when comparing. --- libs/util/wadfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/util/wadfile.c b/libs/util/wadfile.c index 71fe61696..c63106c62 100644 --- a/libs/util/wadfile.c +++ b/libs/util/wadfile.c @@ -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 *