NULL check
This commit is contained in:
1 parent
834449af57
commit
0598470942
1 file changed
+3
-4
@@ -1814,10 +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 (i; ss >> i;) {
|
||||
long il = stol(i);
|
||||
if(il > 0)
|
||||
last_games.push_back(il);
|
||||
for (string i; ss >> i;) {
|
||||
if(i.length() > 0)
|
||||
last_games.push_back(stol(i));
|
||||
if (ss.peek() == ',')
|
||||
ss.ignore();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user