NULL check

This commit is contained in:
Kai Philipp
2019-09-13 17:34:16 +02:00
parent a28d67ac97
commit 5f69d6e9f0
+3 -3
View File
@@ -1814,9 +1814,9 @@ ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData
LOG_ERROR("last_games from db = " << dbPlayerData.last_games);
std::vector<long> last_games;
std::stringstream ss(dbPlayerData.last_games);
for (long i; ss >> i;) {
if(i > 0)
last_games.push_back(i);
for (string i; ss >> i;) {
if(i.length() > 0)
last_games.push_back((long)i);
if (ss.peek() == ',')
ss.ignore();
}