aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/environment.cpp1
-rw-r--r--src/player.cpp1
2 files changed, 2 insertions, 0 deletions
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);