From a3522a409966a986494efcad7190098cd97ea7e4 Mon Sep 17 00:00:00 2001 From: ChouTatsumi <choutatsumi@gmail.com> Date: Mon, 29 Apr 2019 20:46:47 +1000 Subject: [PATCH] bug 20:46 --- server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.c b/server.c index 7c2ef35..b81678a 100644 --- a/server.c +++ b/server.c @@ -383,10 +383,13 @@ bool show_start_page(int sockfd, char* username) { printf("user_len = %d\r\n", username_length); char* added_prefix = "<p>"; int added_prefix_length = strlen(added_prefix); + printf("added_prefix_len = %d\r\n", added_prefix_length); char* added_suffix = "</p>\n\n"; int added_suffix_length = strlen(added_suffix); + printf("added_suffix_len = %d\r\n", added_prefix_length); // the length needs to include the html tags for the username - int added_length = username_length + 9; + int added_length = + username_length + added_prefix_length + added_suffix_length; char added[added_length]; -- GitLab