mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
enforce upper limit on minutes to prevent unix timestamp from overflowing
This commit is contained in:
parent
8f5f45c18f
commit
0c16a58563
|
@ -1444,7 +1444,7 @@ void CServer::ConBan(IConsole::IResult *pResult, void *pUser)
|
|||
const char *pReason = "No reason given";
|
||||
|
||||
if(pResult->NumArguments() > 1)
|
||||
Minutes = max(0, pResult->GetInteger(1));
|
||||
Minutes = min(max(0, pResult->GetInteger(1)), 1000000); // todo: fix this in year 2035
|
||||
|
||||
if(pResult->NumArguments() > 2)
|
||||
pReason = pResult->GetString(2);
|
||||
|
|
Loading…
Reference in a new issue