From 34e44fbcbd3c0fb6871d95bb102013d00ec74b4b Mon Sep 17 00:00:00 2001 From: Peter Wiebe Date: Wed, 7 Feb 2024 10:05:23 +0100 Subject: [PATCH] refactoring: level --- src/main/c/hangman.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/c/hangman.c b/src/main/c/hangman.c index 1d490a4..41bfcda 100644 --- a/src/main/c/hangman.c +++ b/src/main/c/hangman.c @@ -351,7 +351,7 @@ int gewonnen(char secret_word[100], char guessed_letters[100]){ void level_plus(){ char KonfDatei[100]; - char levelstr[3]; + char level[3]; int i = 0; FILE *fp = NULL; @@ -361,10 +361,10 @@ void level_plus(){ while(KonfDatei[i] != 0){ i++; } - levelstr[0] = KonfDatei[i-2]; - levelstr[1] = KonfDatei[i-1]; - levelstr[2] = '\0'; - if (levelstr[1] == '9'){ + level[0] = KonfDatei[i-2]; + level[1] = KonfDatei[i-1]; + level[2] = '\0'; + if (level[1] == '9'){ KonfDatei[i-2]++; KonfDatei[i-1] = '0'; } else {