mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
LibWebSocket: Fix confusion about sizeof(size_t) on 64-bit platforms
sizeof(size_t) is 8 on 64-bit platforms, not 64.
This commit is contained in:
parent
00895a5789
commit
f82c4c4137
1 changed files with 1 additions and 1 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue