From bbce590694a4980f9c72ec3775a8e9537f72ee84 Mon Sep 17 00:00:00 2001 From: Kurt Pattyn Date: Sat, 2 Nov 2013 19:59:09 +0100 Subject: [PATCH] Correct cast Change-Id: Ic87115f738ec50fbf7d63a5483dd25b1e451348b Reviewed-by: Kurt Pattyn --- src/websockets/qwebsocketprotocol_p.cpp | 4 ++-- 1 file 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(sizeof(quint32)); - const uchar *mask = reinterpret_cast(&maskingKey); + const char *mask = reinterpret_cast(&maskingKey); for (quint32 i = 0; i < remainder; ++i) { - *(payload + offset + i) ^= static_cast(mask[(i + offset) % 4]); + *(payload + offset + i) ^= (mask[(i + offset) % 4]); } } } -- 2.7.4