From 213d110bc65b93714cd1a01e45ad1de1f95ea5f3 Mon Sep 17 00:00:00 2001 From: Kai Philipp Date: Sat, 14 Sep 2019 17:54:20 +0200 Subject: [PATCH] bugfix vector erase --- src/net/common/serverlobbythread.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/net/common/serverlobbythread.cpp b/src/net/common/serverlobbythread.cpp index 14828bd1..1d15b348 100644 --- a/src/net/common/serverlobbythread.cpp +++ b/src/net/common/serverlobbythread.cpp @@ -1816,13 +1816,15 @@ LOG_ERROR("last_games from db = " << dbPlayerData.last_games); //std::vector last_games; std::stringstream ss(dbPlayerData.last_games); for (string i; ss >> i;) { - if(i.length() > 0) - tmpSession->GetPlayerData()->AddPlayerLastGame(stol(i)); + if(i.length() > 0){ + LOG_ERROR("adding lastGame " << i); + tmpSession->GetPlayerData()->AddPlayerLastGame(stol(i)); + } if (ss.peek() == ',') ss.ignore(); } //tmpSession->GetPlayerData()->SetPlayerLastGames(last_games); -LOG_ERROR("last_games first from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames().back()); +LOG_ERROR("last_games last from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames().back()); this->AuthChallenge(tmpSession, dbPlayerData.secret); } }