diff --git a/src/main/c/Tim/hangman.c b/src/main/c/Tim/hangman.c index d5c5255..8719211 100644 --- a/src/main/c/Tim/hangman.c +++ b/src/main/c/Tim/hangman.c @@ -201,7 +201,7 @@ void changeLetter(char x, char y[], int length, char ptr[]) { if (x == y[i]-32 || x == y[i] ) { - if(i ==0) + if(i ==0 && isupper(y[0])!=0) { ptr[i] = x; } @@ -215,7 +215,7 @@ void changeLetter(char x, char y[], int length, char ptr[]) { if (x == y[i]||x == y[i]+32) { - if(i == 0) + if(i == 0 && isupper(y[0])!=0) { ptr[i] = x-32; }