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

bug 20:46

parent 1a12b810
No related branches found
No related tags found
No related merge requests found
...@@ -383,10 +383,13 @@ bool show_start_page(int sockfd, char* username) { ...@@ -383,10 +383,13 @@ bool show_start_page(int sockfd, char* username) {
printf("user_len = %d\r\n", username_length); printf("user_len = %d\r\n", username_length);
char* added_prefix = "<p>"; char* added_prefix = "<p>";
int added_prefix_length = strlen(added_prefix); int added_prefix_length = strlen(added_prefix);
printf("added_prefix_len = %d\r\n", added_prefix_length);
char* added_suffix = "</p>\n\n"; char* added_suffix = "</p>\n\n";
int added_suffix_length = strlen(added_suffix); 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 // 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]; char added[added_length];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment