Skip to content
Snippets Groups Projects
Commit caee15de authored by ChouTatsumi's avatar ChouTatsumi
Browse files

test 21:19

parent d43e4762
No related branches found
No related tags found
No related merge requests found
...@@ -335,7 +335,7 @@ bool show_modified_page(int sockfd, const char* htmldir, char* added, ...@@ -335,7 +335,7 @@ bool show_modified_page(int sockfd, const char* htmldir, char* added,
int n; int n;
// the length needs to include the html tags for the username // the length needs to include the html tags for the username
int added_length = strlen(added); int added_length = strlen(added) + 1;
// get the size of the file // get the size of the file
struct stat st; struct stat st;
...@@ -385,7 +385,7 @@ bool show_start_page(int sockfd, char* username) { ...@@ -385,7 +385,7 @@ bool show_start_page(int sockfd, char* username) {
// the length needs to include the html tags for the username // the length needs to include the html tags for the username
int added_length = username_length + 9; int added_length = username_length + 9;
char added[added_length + 1]; char added[added_length];
// create added string // create added string
strcat(added, added_prefix); strcat(added, added_prefix);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment