Akarsh Balaji 1 year ago
parent
commit
7426187505
1 changed files with 1 additions and 1 deletions
  1. 1 1
      game_server.c

+ 1 - 1
game_server.c

@@ -464,7 +464,7 @@ int do_command(struct client * p, int cmd_argc, char **cmd_argv) {
     } else if (strcmp(cmd_argv[0], "all_players") == 0 && cmd_argc == 1) {
 		//TODO produce list of all players and their stats in nice text format and sendclient
         	Player * curr = player_list;
-		while(curr){
+		while(curr!=NULL){
 			char str[BUFFER_SIZE - 10];
 			sprintf(str, "%s \t \t total score: %d max score: %d\r\n", curr->name, curr->total_score, curr->max_score);
 			sendclient(p, str);