Skip to content

Commit

Permalink
fixed never closing a file
Browse files Browse the repository at this point in the history
  • Loading branch information
entdark committed Aug 25, 2015
1 parent 1c2856b commit ac7c91a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions CODE-mp/client/cl_demos.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
Expand Down

0 comments on commit ac7c91a

Please sign in to comment.