From 2b8f1db9e7cea3bc5bb3cfa38d0148c38caf556b Mon Sep 17 00:00:00 2001
From: Anqi Chen <a.chen49@student.unimelb.edu.au>
Date: Mon, 29 Apr 2019 18:00:16 +1000
Subject: [PATCH] try new logic

---
 img.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/img.c b/img.c
index ebedf5e..7daae2e 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);
 
                     }
 
                 }
             }
-            
+
 
         }
         
-- 
GitLab