From 3c5df42a17886395cee6141663f84dba15bd11d9 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Sat, 28 Jun 2014 17:01:15 +0200 Subject: [PATCH] Make player files saving again --- src/environment.cpp | 1 + src/player.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/environment.cpp b/src/environment.cpp index 845928a2..24a498aa 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -462,6 +462,7 @@ Player *ServerEnvironment::loadPlayer(const std::string &playername) return NULL; } testplayer.deSerialize(is, path); + is.close(); if (testplayer.getName() == playername) { *player = testplayer; found = true; diff --git a/src/player.cpp b/src/player.cpp index 0d506ec9..f2ff5902 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -314,6 +314,7 @@ void RemotePlayer::save(std::string savedir) return; } testplayer.deSerialize(is, path); + is.close(); if (strcmp(testplayer.getName(), m_name) == 0) { // Open file and serialize std::ostringstream ss(std::ios_base::binary);