From f6d005551ab04e1d22d62fe4f7ff1fd27fd02abf Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Tue, 30 Jan 2024 20:30:47 +0100 Subject: [PATCH] possibly fixed client crash possibly means I have no fucking idea --- src/chat/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat/misc.c b/src/chat/misc.c index fe0b599..08477e7 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -146,7 +146,7 @@ char *read_socket_raw(int socket) //READ JSON MESSAGE if (recv(socket, content_buffer, content_size, 0) != content_size - 2) fprintf(stderr, "Socket probably read wrongly!\n"); - content_buffer[content_size - 2] = '\0'; //TODO: Possible problems + content_buffer[content_size - 1] = '\0'; //TODO: Possible problems return content_buffer; }