Make player files saving again
authorSmallJoker <st.rentsch@hotmail.com>
Sat, 28 Jun 2014 15:01:15 +0000 (17:01 +0200)
committersapier <Sapier at GMX dot net>
Sat, 28 Jun 2014 22:45:04 +0000 (00:45 +0200)
src/environment.cpp
src/player.cpp

index 845928a2080ab64a51195ca8ac753b8944897db0..24a498aa96b6c51414e16604458b4492ff9140a6 100644 (file)
@@ -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;
index 0d506ec99a8e4ceb46bc73814afdd84a1c984b4b..f2ff590272e015c29e21a70695e66557f51fe949 100644 (file)
@@ -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);