forked from freudenreichan/info2Praktikum-Wortsalat
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b02000efe1 | ||
|
|
c3195e0e3d |
No files matched your search
@@ -39,6 +39,7 @@ Startcode/wordsalad_myversion
|
||||
Startcode/wordsalad_initial
|
||||
Startcode/wordsalad
|
||||
runtest
|
||||
test
|
||||
|
||||
# Debug files
|
||||
*.dSYM/
|
||||
|
||||
+1
-1
@@ -65,5 +65,5 @@ int createWordSalad(char salad[MAX_SEARCH_FIELD_LEN][MAX_SEARCH_FIELD_LEN], unsi
|
||||
printf("\n");
|
||||
}
|
||||
printf("\n\nPlatzierung abgeschlossen\n\n");
|
||||
return 0;
|
||||
return word;
|
||||
}
|
||||
+1
-1
@@ -16,7 +16,7 @@ unsigned int count = 0;
|
||||
|
||||
while (fgets(line, sizeof(line), file) != NULL && count < maxWordCount) {
|
||||
char *token = strtok(line, " ,;\n\r\t");
|
||||
while (token != NULL & count < maxWordCount) {
|
||||
while (token != NULL && count < maxWordCount) {
|
||||
if (strlen(token) > 0) {
|
||||
strncpy(words[count], token, MAX_WORD_LEN - 1);
|
||||
words[count][MAX_WORD_LEN - 1] = '\0';
|
||||
|
||||
Executable
BIN
Binary file not shown.
Reference in new issue
Block a user