added terminating character to why2_read_socket

This commit is contained in:
Václav Šmejkal 2023-02-23 09:54:10 +01:00
parent 6fbbee7b68
commit c6093a8926
Signed by: ENGO150
GPG Key ID: F6D6DF86242C5A59

View File

@ -215,6 +215,8 @@ char *why2_read_socket(int socket)
//READ FINAL 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
return content_buffer;
}