diff --git a/.gitignore b/.gitignore index e645cf8..78fd2aa 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ Startcode/wordsalad_myversion Startcode/wordsalad_initial Startcode/wordsalad runtest +test # Debug files *.dSYM/ diff --git a/Startcode/input.c b/Startcode/input.c index 2a91e96..79e5d44 100644 --- a/Startcode/input.c +++ b/Startcode/input.c @@ -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'; diff --git a/Startcode/runTests b/Startcode/runTests new file mode 100755 index 0000000..092c645 Binary files /dev/null and b/Startcode/runTests differ