From dcdf421d1012c3aa0b81fd04bb1bd273f39fbec2 Mon Sep 17 00:00:00 2001
From: ChouTatsumi <choutatsumi@gmail.com>
Date: Mon, 29 Apr 2019 20:52:38 +1000
Subject: [PATCH] test 20:52

---
 server.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/server.c b/server.c
index b81678a..9407f42 100644
--- a/server.c
+++ b/server.c
@@ -385,11 +385,10 @@ bool show_start_page(int sockfd, char* username) {
     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);
+    int added_suffix_length = sizeof(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 + added_prefix_length + added_suffix_length;
+    int added_length = username_length + 9;
 
     char added[added_length];
 
-- 
GitLab