input Versuch 2

This commit is contained in:
bernardjo104126 committed 2026-10-26 15:15:59 +01:00
1 parent 42a1ab8168
commit afdd93f035
1 file changed
+2 -1
+2 -1
View File
@@ -11,9 +11,10 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
unsigned int wordCount = 0;
while(fgets(words[wordCount],MAX_WORD_LEN,file) != NULL){
while(fgets(words[wordCount],MAX_WORD_LEN,file) != NULL && wordCount+1 < maxWordCount){
wordCount++;
}
return wordCount;
}