This commit is contained in:
D2A62006 2025-11-06 12:33:15 +01:00
commit 9a1f2d1d8a

View File

@ -24,7 +24,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
char readLine[MAX_LINE_LEN]; char readLine[MAX_LINE_LEN];
// collects the words line by line and adds them to the list, if its not exceeding the max word count // collects the words line by line and adds them to the list, if its not exceeding the max word count
while (fgets(readLine, sizeof(readLine), file) != (NULL && wordcount < maxWordCount)) { while (fgets(readLine, sizeof(readLine), file) != NULL && (wordcount < maxWordCount)) {
char word[MAX_WORD_LEN]; char word[MAX_WORD_LEN];
int wordIndex = 0; int wordIndex = 0;