From 43669bb852bf4017cd00a6e5bddbf7fc4c5a470f Mon Sep 17 00:00:00 2001 From: Jan-Mirko Otter Date: Tue, 25 Jan 2022 13:04:31 +0100 Subject: [PATCH] Fixed masking for continuations (#1406) --- src/WebSocketProtocol.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebSocketProtocol.h b/src/WebSocketProtocol.h index 38f6a6b..06ecd92 100644 --- a/src/WebSocketProtocol.h +++ b/src/WebSocketProtocol.h @@ -401,7 +401,7 @@ protected: if (isServer) { /* No need to unmask if mask is 0 */ uint32_t nullmask = 0; - if (!memcmp(wState->mask, &nullmask, sizeof(uint32_t))) { + if (memcmp(wState->mask, &nullmask, sizeof(uint32_t))) { if /*constexpr*/ (LIBUS_RECV_BUFFER_LENGTH == length) { unmaskAll(src, wState->mask); } else {