clean up & commit

This commit is contained in:
engelpa103619 committed 2026-10-29 09:55:49 +01:00
1 parent 2e24fdcec3
commit 26d80b65af
1 file changed
+2 -2
+2 -2
View File
@@ -8,7 +8,7 @@ int leseEinWort(FILE *file, char zielWort[])
{
int c;
int i = 0;
while((c = fgetc(file)) != EOF) // liest aus Textdatei und überprüft ob End Of File ist
while((c = fgetc(file)) != EOF) // liest aus Textdatei und überprüft ob End Of File ist. fgetc liest exakt ein einzelnes Zeichen. fgetc komplette Zeile
{
@@ -39,7 +39,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
{
int anzahl = 0;
while((leseEinWort(file, words[anzahl])) == 1 && anzahl < maxWordCount)
while((anzahl < maxWordCount && leseEinWort(file, words[anzahl])) == 1)
{
anzahl++;
}