Browse Source

Hotfix: Bei Wörtern mit kleinen Buchstaben werden die Buchstaben als klein übernommen

remotes/origin/tim
fdai7727 11 months ago
parent
commit
516049f1bd
  1. 4
      src/main/c/Tim/hangman.c

4
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 (x == y[i]-32 || x == y[i] )
{ {
if(i ==0)
if(i ==0 && isupper(y[0])!=0)
{ {
ptr[i] = x; 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 (x == y[i]||x == y[i]+32)
{ {
if(i == 0)
if(i == 0 && isupper(y[0])!=0)
{ {
ptr[i] = x-32; ptr[i] = x-32;
} }

Loading…
Cancel
Save