diff --git a/Start_Windows/game.o b/Start_Windows/game.o new file mode 100644 index 0000000..1db69c1 Binary files /dev/null and b/Start_Windows/game.o differ diff --git a/Start_Windows/input.c b/Start_Windows/input.c index 248f319..a96ff01 100644 --- a/Start_Windows/input.c +++ b/Start_Windows/input.c @@ -20,6 +20,19 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) while(word_parts != NULL && counter < maxWordCount) { + // Kopiere das Wort sicher in das words-Array + strncpy(words[counter], word_parts, MAX_WORD_LEN - 1); + words[counter][MAX_WORD_LEN - 1] = '\0'; + + // Alles in Großbuchstaben umwandeln + for(int i = 0; words[counter][i] != '\0'; i++) + words[counter][i] = toupper(words[counter][i]); + + + + + + /* for(i = 0; i < MAX_WORD_LEN -1; i++) //MAX = 100 { words[counter][i] = toupper(word_parts[i]); //Großbuchstaben erzeugen @@ -29,7 +42,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount) break; } words[counter][i] = '\0'; //Stringdefinition vervollständigen - + */ counter++; // Wort eingelesen, Wortzähler erhöhen word_parts = strtok(NULL, ",;\n\t/. "); //NULL für Zeiger angeben } diff --git a/Start_Windows/input.o b/Start_Windows/input.o new file mode 100644 index 0000000..ffe67fe Binary files /dev/null and b/Start_Windows/input.o differ diff --git a/Start_Windows/runTests.exe b/Start_Windows/runTests.exe new file mode 100644 index 0000000..6994fcf Binary files /dev/null and b/Start_Windows/runTests.exe differ