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

test 21:15

parent 62651b00
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 = sizeof(added); int added_length = strlen(added);
// get the size of the file // get the size of the file
struct stat st; struct stat st;
...@@ -357,6 +357,9 @@ bool show_modified_page(int sockfd, const char* htmldir, char* added, ...@@ -357,6 +357,9 @@ bool show_modified_page(int sockfd, const char* htmldir, char* added,
return false; return false;
} }
close(filefd); close(filefd);
print_buff(buff);
// move the trailing part backward // move the trailing part backward
int p1, p2; int p1, p2;
for (p1 = size - 1, p2 = p1 - added_length; p1 >= size - inset_index; for (p1 = size - 1, p2 = p1 - added_length; p1 >= size - inset_index;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment