From 2e275731a3512a9a864882348e04fd7897a9af7f Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sat, 11 Jul 2020 12:41:37 +0200 Subject: [PATCH] websocket: fix compilation --- vlib/net/websocket/ws.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/net/websocket/ws.v b/vlib/net/websocket/ws.v index 3741f50728..bbdf53513e 100644 --- a/vlib/net/websocket/ws.v +++ b/vlib/net/websocket/ws.v @@ -385,7 +385,7 @@ pub fn (mut ws Client) read() int { frame_size = u64(header_len) + payload_len if frame_size > initial_buffer { l.d('reallocating: ${frame_size}') - data = v_realloc(data, frame_size) + data = v_realloc(data, u32(frame_size)) } } else if frame.payload_len == u64(127) && bytes_read == u64(extended_payload64_end_byte) { header_len += 8 // TODO Not sure... @@ -409,7 +409,7 @@ pub fn (mut ws Client) read() int { frame_size = u64(header_len) + payload_len if frame_size > initial_buffer { l.d('reallocating: ${frame_size}') - data = v_realloc(data, frame_size) + data = v_realloc(data, u32(frame_size)) // TODO u64 => u32 } } }