NULL check
This commit is contained in:
@@ -1814,9 +1814,10 @@ ServerLobbyThread::UserValid(unsigned playerId, const DBPlayerData &dbPlayerData
|
|||||||
LOG_ERROR("last_games from db = " << dbPlayerData.last_games);
|
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 (stol(i); ss >> i;) {
|
for (i; ss >> i;) {
|
||||||
if(i.length() > 0)
|
long il = stol(i);
|
||||||
last_games.push_back(i);
|
if(il > 0)
|
||||||
|
last_games.push_back(il);
|
||||||
if (ss.peek() == ',')
|
if (ss.peek() == ',')
|
||||||
ss.ignore();
|
ss.ignore();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user