From 9bc89fd23c02459177b5edeb3adee0f282e72760 Mon Sep 17 00:00:00 2001 From: Shudza <10067406+shudza@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:24:55 +0200 Subject: [PATCH] Handle negative time value in CharacterScreenIdleKick (#2690) --- src/game/WorldSession.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index cfa3f4189f4..8fa46eead20 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -1333,7 +1333,7 @@ bool WorldSession::CharacterScreenIdleKick(uint32 currTime) if (!maxIdle) // disabled return false; - if ((currTime - m_idleTime) >= (maxIdle * 1000)) + if (currTime > m_idleTime && (currTime - m_idleTime) >= (maxIdle * 1000)) { sLog.Out(LOG_BASIC, LOG_LVL_DEBUG, "SESSION: Kicking session [%s] from character selection", GetRemoteAddress().c_str()); return true;