mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2024-11-10 07:21:58 +00:00
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:
parent
024dab7f8a
commit
ee2b6ce55a
1 changed files with 1 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue