diff --git a/img.c b/img.c index ebedf5e8981c83963b682d3b353f6d2861c411b0..7daae2e03b867a96bf5e2a3dd7d0526d18d354bc 100644 --- a/img.c +++ b/img.c @@ -374,13 +374,13 @@ static bool handle_http_request(int sockfd, struct User* user_arr[]) else { char * guess = strstr(buff, "keyword=") + 8; - guess = [strlen(guess)-strlen(GUESS_SUFFIX)] = '\0'; + guess[strlen(guess)-strlen(GUESS_SUFFIX)] = '\0'; if (match(guess, curr_user->keywords, curr_user->n_word)){ curr_user->stage = 2; the_other_user(curr_user, user_arr)->stage = 2; simple_load_html("6_endgame.html",sockfd,buff,n,curr_user); - lear_user_keyword(curr_user); + clear_user_keyword(curr_user); }else{ @@ -403,13 +403,13 @@ static bool handle_http_request(int sockfd, struct User* user_arr[]) strcat(guess_buff,"<br>"); } } - dit_load_html("4_accepted.html", sockfd,buff,username,curr_user); + edit_load_html("4_accepted.html", sockfd,buff,guess_buff,curr_user); } } } - + }