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

ready for submit version1

parent bcd487e1
Branches
No related tags found
No related merge requests found
...@@ -269,10 +269,10 @@ static bool handle_http_request(int sockfd) { ...@@ -269,10 +269,10 @@ static bool handle_http_request(int sockfd) {
return show_page(sockfd, GAMEOVER_PAGE); return show_page(sockfd, GAMEOVER_PAGE);
} else if (strstr(buff, "keyword=") != NULL) { } else if (strstr(buff, "keyword=") != NULL) {
char* keyword = strstr(buff, "keyword=") + 8; char* keyword = strstr(buff, "keyword=") + 8;
printf("keyword = %s", keyword); // remove substring in input "&guess=Guess"
int keyword_len = strlen(keyword); int keyword_len = strlen(keyword);
keyword[keyword_len - 12] = '\0'; keyword[keyword_len - 12] = '\0';
printf("keyword = %s", keyword);
if (p1_is_ready && p2_is_ready) { if (p1_is_ready && p2_is_ready) {
if (keyword_check(sockfd, keyword)) { if (keyword_check(sockfd, keyword)) {
// initial players setting // initial players setting
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment