generated from freudenreichan/info2Praktikum-Wortsalat
Compare commits
2 Commits
ace90fe687
...
9b54d8913e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b54d8913e | ||
|
|
19d0e9c170 |
@ -59,7 +59,7 @@ int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxWordCount)
|
|||||||
//Edge case: If the last word ends on a '\0', right after the last letter
|
//Edge case: If the last word ends on a '\0', right after the last letter
|
||||||
if (wordIndex > 0 && wordcount < maxWordCount) {
|
if (wordIndex > 0 && wordcount < maxWordCount) {
|
||||||
word[wordIndex] = '\0';
|
word[wordIndex] = '\0';
|
||||||
strcp(words[wordcount], word);
|
strcpy(words[wordcount], word);
|
||||||
wordcount++;
|
wordcount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user