From 842355c831404cc1aa3d9ac0918eed0c2d2a86fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Tom=C3=A1s?= Date: Sat, 11 Jul 2020 23:26:03 -0300 Subject: Fix decoding --- client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'client.cpp') diff --git a/client.cpp b/client.cpp index 408c2e9..80d784c 100644 --- a/client.cpp +++ b/client.cpp @@ -9,9 +9,9 @@ struct Client { Client(const Buffer &b) : cursor(b), window_start(cursor) {} void parse_message() { - uint8_t message[MAX_MSG_SIZE] = {}; + int8_t message[MAX_MSG_SIZE] = {}; read(sockfd, message, MAX_MSG_SIZE - 1); - uint8_t *iter = message; + int8_t *iter = message; while (*iter) { switch (*iter) { case OP_MOVE1: @@ -46,7 +46,7 @@ struct Client { } } - void show(int16_t window_w, int16_t window_h) { + void show(size_t window_w, size_t window_h) { char *view = new char[window_w * window_h]; Point window_end(window_start); -- cgit v1.2.3