diff options
author | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-07-11 23:26:03 -0300 |
---|---|---|
committer | Juan Manuel Tomás <jtomas1815@gmail.com> | 2020-07-11 23:26:03 -0300 |
commit | 842355c831404cc1aa3d9ac0918eed0c2d2a86fc (patch) | |
tree | 15d45bad489fb394b7053a135e905b02fab414ae /client.cpp | |
parent | 13fdfe875efdfb33d392c5e634ceff494962e7dc (diff) | |
download | jet-842355c831404cc1aa3d9ac0918eed0c2d2a86fc.tar.gz jet-842355c831404cc1aa3d9ac0918eed0c2d2a86fc.zip |
Fix decoding
Diffstat (limited to 'client.cpp')
-rw-r--r-- | client.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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); |