From 9cf03499cffe5e3afc1139c81cb98c389b1d1c0a Mon Sep 17 00:00:00 2001 From: Evgeny Stepanischev Date: Fri, 3 Nov 2023 07:25:00 +0300 Subject: [PATCH] stricter verification --- helpers/hangman.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/helpers/hangman.c b/helpers/hangman.c index 6cc4d7f..ce9b4f0 100644 --- a/helpers/hangman.c +++ b/helpers/hangman.c @@ -284,7 +284,12 @@ HangmanLangConfig* hangman_load_config(char* meta_file) { config->letters[config->letters_cnt++] = num; if(config->unicode_base > num) config->unicode_base = num; - token = end + 1; // +1 because of space + + if(*end == ' ') { + token = end + 1; // +1 because of space + } else { + break; + } } config->keyboard_rows = ceil((float)config->letters_cnt / config->keyboard_cols);