From: SmallJoker Date: Sat, 28 Jun 2014 15:01:15 +0000 (+0200) Subject: Make player files saving again X-Git-Tag: 0.4.10~29 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3c5df42a17886395cee6141663f84dba15bd11d9;p=oweals%2Fminetest.git Make player files saving again --- diff --git a/src/environment.cpp b/src/environment.cpp index 845928a20..24a498aa9 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 0d506ec99..f2ff59027 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);