readwords() korrigiert und getestet
This commit is contained in:
parent
476887d5ab
commit
16ab4a59ab
6
input.c
6
input.c
@ -42,12 +42,6 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
|
|||||||
strncpy(words[wordCount], token, MAX_WORD_LEN -1);
|
strncpy(words[wordCount], token, MAX_WORD_LEN -1);
|
||||||
words[wordCount][MAX_WORD_LEN -1] = '\0';
|
words[wordCount][MAX_WORD_LEN -1] = '\0';
|
||||||
|
|
||||||
|
|
||||||
words[wordCount][end] = '\0';
|
|
||||||
end--;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
wordCount++;
|
wordCount++;
|
||||||
token = strtok(NULL, ",;\n");
|
token = strtok(NULL, ",;\n");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user