From 289282dc7a43bbc9794e7ed4cdfd2a3dccf134b8 Mon Sep 17 00:00:00 2001 From: Kai Philipp Date: Mon, 9 Sep 2019 22:52:35 +0200 Subject: [PATCH] vector handling bugfix --- src/net/common/sessiondata.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/net/common/sessiondata.cpp b/src/net/common/sessiondata.cpp index e5356648..30609c33 100644 --- a/src/net/common/sessiondata.cpp +++ b/src/net/common/sessiondata.cpp @@ -438,15 +438,15 @@ SessionData::IsPlayerAllowedToJoinLimitRank() boost::mutex::scoped_lock lock(m_dataMutex); // @TODO: iterate m_lastGames - unsigned long then = (unsigned long)time(NULL) - (unsigned long)(SERVER_ALLOWED_RANKING_GAMES_MINUTES * 10); + long then = (long)time(NULL) - (long)(SERVER_ALLOWED_RANKING_GAMES_MINUTES * 10); - unsigned long num = (unsigned long)SERVER_ALLOWED_RANKING_GAMES_PER_MINUTES; + long num = (long)SERVER_ALLOWED_RANKING_GAMES_PER_MINUTES; - unsigned long count = 0; + long count = 0; auto timeStamp = m_lastGames.begin(); while (timeStamp != m_lastGames.end()) { - if(timeStamp > then) + if((long)timeStamp > then) count++; else m_lastGames.erase(timeStamp);