summaryrefslogtreecommitdiff
path: root/client.cpp
diff options
context:
space:
mode:
authorJuan Manuel Tomás <jtomas1815@gmail.com>2020-07-11 23:26:03 -0300
committerJuan Manuel Tomás <jtomas1815@gmail.com>2020-07-11 23:26:03 -0300
commit842355c831404cc1aa3d9ac0918eed0c2d2a86fc (patch)
tree15d45bad489fb394b7053a135e905b02fab414ae /client.cpp
parent13fdfe875efdfb33d392c5e634ceff494962e7dc (diff)
downloadjet-842355c831404cc1aa3d9ac0918eed0c2d2a86fc.tar.gz
jet-842355c831404cc1aa3d9ac0918eed0c2d2a86fc.zip
Fix decoding
Diffstat (limited to 'client.cpp')
-rw-r--r--client.cpp6
1 files changed, 3 insertions, 3 deletions
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);