From ae7c52985bf3542fcdc076f54ec8d03dd3bb2b64 Mon Sep 17 00:00:00 2001 From: Steven Date: Sun, 12 Feb 2012 02:59:21 +0000 Subject: [PATCH] common.c git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@636 af15c1b1-3010-417e-b628-4374ebc0bcbd --- Quake/common.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Quake/common.c b/Quake/common.c index 6080ce75..0e0f4feb 100644 --- a/Quake/common.c +++ b/Quake/common.c @@ -1505,7 +1505,7 @@ static int COM_FindFile (const char *filename, int *handle, FILE **file, searchpath_t *search; char netpath[MAX_OSPATH]; pack_t *pak; - int i, findtime; + int i, findtime, l; if (file && handle) Sys_Error ("COM_FindFile: both handle and file set"); @@ -1582,8 +1582,14 @@ static int COM_FindFile (const char *filename, int *handle, FILE **file, } } - Con_DPrintf2 ("FindFile: can't find %s\n", filename); /* if(developer.value >= 2) */ - /* would've been better if I'd implement and use Sys_DPrintf() */ + l = strlen(filename); + if (l < 3 || strcmp (filename+l-3,"pcx") != 0) + Con_DPrintf ("FindFile: can't find %s\n", filename); + else + Con_DPrintf2 ("FindFile: can't find %s\n", filename); + // Log pcx texture misses only if (developer.value >= 2) + // Would've been better if I'd implement and use Sys_DPrintf() - O.S. + if (handle) *handle = -1; if (file)