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:
muxator 2019-02-27 00:56:41 +01:00
parent 4b913172fe
commit 90bfbeb38d

View file

@ -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;