diff --git a/server.c b/server.c index 7c2ef35ea9465f65871757be27d8870664e3452c..b81678a981c637ff8526139f54ed09e873c20f42 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];