PadMessageHandler.js: fixed logic error in a guard condition
The guard condition on count being non negative and < 100 used the wrong
boolean operator. In its form it was impossible.
This error was introduced in 2013, in 5592c4b0fe
.
Fixes #3499
This commit is contained in:
parent
4b913172fe
commit
90bfbeb38d
1 changed files with 2 additions and 2 deletions
|
@ -462,9 +462,9 @@ function handleGetChatMessages(client, message)
|
|||
|
||||
var start = message.data.start;
|
||||
var end = message.data.end;
|
||||
var count = start - count;
|
||||
var count = end - start;
|
||||
|
||||
if(count < 0 && count > 100)
|
||||
if(count < 0 || count > 100)
|
||||
{
|
||||
messageLogger.warn("Dropped message, GetChatMessages Message, client requested invalid amout of messages!");
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue