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
pull/3572/head
parent
4b913172fe
commit
90bfbeb38d
|
@ -462,9 +462,9 @@ function handleGetChatMessages(client, message)
|
||||||
|
|
||||||
var start = message.data.start;
|
var start = message.data.start;
|
||||||
var end = message.data.end;
|
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!");
|
messageLogger.warn("Dropped message, GetChatMessages Message, client requested invalid amout of messages!");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue