From ac7c91a61cb68e20a5061b3d437f24872bedaf06 Mon Sep 17 00:00:00 2001 From: entdark Date: Tue, 25 Aug 2015 16:05:59 +0500 Subject: [PATCH] fixed never closing a file --- CODE-mp/client/cl_demos.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/CODE-mp/client/cl_demos.cpp b/CODE-mp/client/cl_demos.cpp index 26127afa..555aef55 100644 --- a/CODE-mp/client/cl_demos.cpp +++ b/CODE-mp/client/cl_demos.cpp @@ -760,7 +760,6 @@ static int demoFindNext(const char *fileName) { int i; const int len = strlen(fileName); char name[MAX_OSPATH], seekName[MAX_OSPATH]; - fileHandle_t demoHandle = 0; qboolean tryAgain = qtrue; if (isdigit(fileName[len-1]) && ((fileName[len-2] == '.'))) { Com_sprintf(seekName, len-1, fileName); @@ -774,8 +773,7 @@ static int demoFindNext(const char *fileName) { tryAgain: for (i = demoNextNum + 1; i < 99; i++) { Com_sprintf(name, MAX_OSPATH, "mmedemos/%s.%d.mme", seekName, i); - FS_FOpenFileRead(name, &demoHandle, qtrue); - if (demoHandle) { + if (FS_FileExists(name)) { Com_Printf("Next demo file: %s\n", name); return i; }