possibly fixed client crash

possibly means I have no fucking idea
This commit is contained in:
Václav Šmejkal 2024-01-30 20:30:47 +01:00
parent c27b7d6a68
commit f6d005551a
Signed by: ENGO150
GPG Key ID: 4A57E86482968843

View File

@ -146,7 +146,7 @@ char *read_socket_raw(int socket)
//READ JSON MESSAGE //READ JSON MESSAGE
if (recv(socket, content_buffer, content_size, 0) != content_size - 2) fprintf(stderr, "Socket probably read wrongly!\n"); 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; return content_buffer;
} }