diff options
-rw-r--r-- | src/websockets/qwebsocketprotocol_p.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/websockets/qwebsocketprotocol_p.cpp b/src/websockets/qwebsocketprotocol_p.cpp index 4316a4b..c00711b 100644 --- a/src/websockets/qwebsocketprotocol_p.cpp +++ b/src/websockets/qwebsocketprotocol_p.cpp @@ -176,10 +176,10 @@ void mask(char *payload, quint64 size, quint32 maskingKey) if (remainder) { const quint32 offset = i * static_cast<quint32>(sizeof(quint32)); - const uchar *mask = reinterpret_cast<uchar *>(&maskingKey); + const char *mask = reinterpret_cast<const char *>(&maskingKey); for (quint32 i = 0; i < remainder; ++i) { - *(payload + offset + i) ^= static_cast<char>(mask[(i + offset) % 4]); + *(payload + offset + i) ^= (mask[(i + offset) % 4]); } } } |