fixed fitzquake's map existence check in Host_Changelevel_f () leaking

file handles which would end up in a Sys_Error () due to consuming all
free handles if many maps reside not in pak files.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@825 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2013-03-01 23:55:12 +00:00
parent 024dab7f8a
commit ee2b6ce55a
1 changed files with 1 additions and 2 deletions

View File

@ -866,7 +866,6 @@ Goes to a new map, taking all clients along
void Host_Changelevel_f (void)
{
char level[MAX_QPATH];
int i; //johnfitz
if (Cmd_Argc() != 2)
{
@ -881,7 +880,7 @@ void Host_Changelevel_f (void)
//johnfitz -- check for client having map before anything else
q_snprintf (level, sizeof(level), "maps/%s.bsp", Cmd_Argv(1));
if (COM_OpenFile (level, &i, NULL) == -1)
if (!COM_FileExists(level, NULL))
Host_Error ("cannot find map %s", level);
//johnfitz