From 21168ea8edcb833e35ee11d1bc031eff4233be73 Mon Sep 17 00:00:00 2001 From: Yamagi Burmeister Date: Sun, 4 Oct 2009 06:57:04 +0000 Subject: [PATCH] Noch einige Bugs durch das neue Dateisystem behoben --- src/client/menu/menu.c | 2 +- src/server/sv_ccmds.c | 4 ++-- src/server/sv_init.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/menu/menu.c b/src/client/menu/menu.c index 03a935fd..564677f6 100644 --- a/src/client/menu/menu.c +++ b/src/client/menu/menu.c @@ -2146,7 +2146,7 @@ static void Create_Savestrings (void) else { FS_Read (m_savestrings[i], sizeof(m_savestrings[i]), (size_t)f); - fclose (f); + FS_FCloseFile (f); m_savevalid[i] = true; } } diff --git a/src/server/sv_ccmds.c b/src/server/sv_ccmds.c index 48f12b95..271c4138 100644 --- a/src/server/sv_ccmds.c +++ b/src/server/sv_ccmds.c @@ -319,7 +319,7 @@ void SV_ReadLevelFile (void) } FS_Read (sv.configstrings, sizeof(sv.configstrings), (size_t)f); CM_ReadPortalState (f); - fclose (f); + FS_FCloseFile (f); Com_sprintf (name, sizeof(name), "%s/save/current/%s.sav", FS_Gamedir(), sv.name); ge->ReadLevel (name); @@ -430,7 +430,7 @@ void SV_ReadServerFile (void) // these will be things like coop, skill, deathmatch, etc while (1) { - if (!fread (name, 1, sizeof(name), f)) + if (!FS_Read (name, 1, sizeof(name), f)) break; FS_Read (string, sizeof(string), (size_t)f); Com_DPrintf ("Set %s = %s\n", name, string); diff --git a/src/server/sv_init.c b/src/server/sv_init.c index 9b3ca4f2..bd274a7b 100644 --- a/src/server/sv_init.c +++ b/src/server/sv_init.c @@ -177,7 +177,7 @@ void SV_SpawnServer (char *server, char *spawnpoint, server_state_t serverstate, Com_DPrintf ("SpawnServer: %s\n",server); if (sv.demofile) - fclose (sv.demofile); + FS_FCloseFile (sv.demofile); svs.spawncount++; // any partially connected client will be // restarted