diff --git a/src/chat/misc.c b/src/chat/misc.c index 7687fe1..c29b9e2 100644 --- a/src/chat/misc.c +++ b/src/chat/misc.c @@ -403,7 +403,7 @@ void *why2_communicate_thread(void *arg) decoded_buffer = get_string_from_json_string(raw, "message"); //DECODE - invalid_username = (strlen(decoded_buffer) > WHY2_MAX_USERNAME_LENGTH) || !check_username(decoded_buffer); //CHECK FOR USERNAMES LONGER THAN 20 CHARACTERS + invalid_username = (strlen(decoded_buffer) > WHY2_MAX_USERNAME_LENGTH) || (strlen(decoded_buffer) < WHY2_MIN_USERNAME_LENGTH) || (!check_username(decoded_buffer)); //CHECK FOR USERNAMES LONGER THAN 20 CHARACTERS why2_deallocate(username); username = decoded_buffer; @@ -604,7 +604,7 @@ void *why2_listen_server(void *socket) exiting = 1; //EXIT THIS THREAD } else if (strcmp(read + 8, WHY2_CHAT_CODE_PICK_USERNAME) == 0) //PICK USERNAME { - printf("%sEnter username (a-Z, 0-9; max %d characters):\n", WHY2_CLEAR_AND_GO_UP, WHY2_MAX_USERNAME_LENGTH); + printf("%sEnter username (a-Z, 0-9; %d-%d characters):\n", WHY2_CLEAR_AND_GO_UP, WHY2_MAX_USERNAME_LENGTH, WHY2_MAX_USERNAME_LENGTH); fflush(stdout); goto continue_input;