diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-18 12:51:31 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-18 12:51:31 +0200 |
commit | f82c4c4137b6481df0ea7e388474f369718764a7 (patch) | |
tree | 4ae17d6620f9321201293d684302cea6a9c98670 | |
parent | 00895a57893f1680c30ec0bc3ad23ca8b3c2d159 (diff) | |
download | serenity-f82c4c4137b6481df0ea7e388474f369718764a7.zip |
LibWebSocket: Fix confusion about sizeof(size_t) on 64-bit platforms
sizeof(size_t) is 8 on 64-bit platforms, not 64.
-rw-r--r-- | Userland/Libraries/LibWebSocket/WebSocket.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWebSocket/WebSocket.cpp b/Userland/Libraries/LibWebSocket/WebSocket.cpp index 47da68f07a..06b74c0fbe 100644 --- a/Userland/Libraries/LibWebSocket/WebSocket.cpp +++ b/Userland/Libraries/LibWebSocket/WebSocket.cpp @@ -493,7 +493,7 @@ void WebSocket::send_frame(WebSocket::OpCode op_code, ReadonlyBytes payload, boo TODO(); } else if (payload.size() > NumericLimits<u16>::max()) { // Send (the 'mask' flag + 127) + the 8-byte payload length - if constexpr (sizeof(size_t) >= 64) { + if constexpr (sizeof(size_t) >= 8) { u8 payload_length[9] = { (u8)((has_mask ? 0x80 : 0x00) | 127), (u8)((payload.size() >> 56) & 0xff), |