generated from freudenreichan/info2Praktikum-Wortsalat
changing the do while loop
This commit is contained in:
parent
2d3be4d58a
commit
bbdb1f2208
@ -20,7 +20,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
|
||||
return 0;
|
||||
}
|
||||
|
||||
fgets(buffer, MAX_LINE_LEN, file);
|
||||
fgets(buffer, MAX_LINE_LEN * maxWordCount, file);
|
||||
//fscanf(file, "%s", buffer);
|
||||
|
||||
do
|
||||
@ -55,7 +55,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
|
||||
}
|
||||
|
||||
i++;
|
||||
} while ((i < MAX_LINE_LEN) || (word < maxWordCount));
|
||||
} while ((i < MAX_LINE_LEN) && (word < maxWordCount));
|
||||
|
||||
return word + 1;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user