bugfix vector erase

This commit is contained in:
Kai Philipp
2019-09-14 17:46:43 +02:00
parent 5bd3d84bc2
commit 8290930393
+2
View File
@@ -286,8 +286,10 @@ LOG_ERROR("checking IsPlayerAllowedToJoinCreateLimitRank() ");
int i=0;
for(std::vector<long>::iterator timeStamp = m_last_games.begin(); timeStamp != m_last_games.end(); ++timeStamp) {
if(*timeStamp > then)
LOG_ERROR("counting timeStamp in time " << timeStamp);
count++;
else
LOG_ERROR("erasing overdued timestamp " << timeStamp);
m_last_games.erase(m_last_games.begin() + i); // erase overdued entries
i++;
}