make missing texture no-spam hack safer

git-svn-id: http://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@629 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
svdijk 2012-02-08 18:22:55 +00:00
parent 5539f60c75
commit 56f65849c7

View file

@ -1586,7 +1586,7 @@ static int COM_FindFile (const char *filename, int *handle, FILE **file,
// Don't spam about missing pcx textures // Don't spam about missing pcx textures
l = strlen(filename); l = strlen(filename);
if (strcmp (filename+l-3,"pcx") != 0) if (l<3 || strcmp (filename+l-3,"pcx") != 0)
Con_DPrintf ("FindFile: can't find %s\n", filename); Con_DPrintf ("FindFile: can't find %s\n", filename);
if (handle) if (handle)