Skip to content

Commit

Permalink
Handle negative time value in CharacterScreenIdleKick (#2690)
Browse files Browse the repository at this point in the history
  • Loading branch information
shudza authored Jun 24, 2024
1 parent 65f155a commit 9bc89fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/WorldSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9bc89fd

Please sign in to comment.