bugfix vector erase

This commit is contained in:
Kai Philipp
2019-09-14 17:54:20 +02:00
parent a93bb49485
commit 213d110bc6
+5 -3
View File
@@ -1816,13 +1816,15 @@ LOG_ERROR("last_games from db = " << dbPlayerData.last_games);
//std::vector<long> last_games; //std::vector<long> last_games;
std::stringstream ss(dbPlayerData.last_games); std::stringstream ss(dbPlayerData.last_games);
for (string i; ss >> i;) { for (string i; ss >> i;) {
if(i.length() > 0) if(i.length() > 0){
tmpSession->GetPlayerData()->AddPlayerLastGame(stol(i)); LOG_ERROR("adding lastGame " << i);
tmpSession->GetPlayerData()->AddPlayerLastGame(stol(i));
}
if (ss.peek() == ',') if (ss.peek() == ',')
ss.ignore(); ss.ignore();
} }
//tmpSession->GetPlayerData()->SetPlayerLastGames(last_games); //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); this->AuthChallenge(tmpSession, dbPlayerData.secret);
} }
} }