bug enclosing

This commit is contained in:
Kai Philipp
2019-09-13 15:05:22 +02:00
parent ec1c39040d
commit 40a25f4a1e
+9 -9
View File
@@ -1812,15 +1812,15 @@ ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData
tmpSession->GetPlayerData()->SetDBId(dbPlayerData.id); tmpSession->GetPlayerData()->SetDBId(dbPlayerData.id);
tmpSession->GetPlayerData()->SetCountry(dbPlayerData.country); tmpSession->GetPlayerData()->SetCountry(dbPlayerData.country);
LOG_ERROR("lastGames from db = " << dbPlayerData.lastGames); LOG_ERROR("lastGames from db = " << dbPlayerData.lastGames);
std::vector<long> lastGames; // std::vector<long> lastGames;
std::stringstream ss(dbPlayerData.lastGames); // std::stringstream ss(dbPlayerData.lastGames);
for (int i; ss >> i;) { // for (int i; ss >> i;) {
lastGames.push_back(i); // lastGames.push_back(i);
if (ss.peek() == ',') // if (ss.peek() == ',')
ss.ignore(); // ss.ignore();
} // }
tmpSession->GetPlayerData()->SetPlayerLastGames(lastGames); // tmpSession->GetPlayerData()->SetPlayerLastGames(lastGames);
LOG_ERROR("lastGames first from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames().front()); // LOG_ERROR("lastGames first from vector after db = " << tmpSession->GetPlayerData()->GetPlayerLastGames().front());
this->AuthChallenge(tmpSession, dbPlayerData.secret); this->AuthChallenge(tmpSession, dbPlayerData.secret);
} }
} }