diff --git a/server.c b/server.c index de68823f120aa2f5e280626692e3eb4ca1e3b1fa..9eb42e4c2be9804ce9e4de79c3007de83c22265a 100644 --- a/server.c +++ b/server.c @@ -269,10 +269,10 @@ static bool handle_http_request(int sockfd) { return show_page(sockfd, GAMEOVER_PAGE); } else if (strstr(buff, "keyword=") != NULL) { char* keyword = strstr(buff, "keyword=") + 8; - printf("keyword = %s", keyword); + // remove substring in input "&guess=Guess" int keyword_len = strlen(keyword); keyword[keyword_len - 12] = '\0'; - printf("keyword = %s", keyword); + if (p1_is_ready && p2_is_ready) { if (keyword_check(sockfd, keyword)) { // initial players setting