diff --git a/Startcode/input.c b/Startcode/input.c index 65541fd..0883c58 100644 --- a/Startcode/input.c +++ b/Startcode/input.c @@ -24,14 +24,14 @@ unsigned int readWords(FILE *file, char words[][MAX_WORD_LEN], unsigned int maxW static int createSingleWords(char text[MAX_LINE_LEN], char words[][MAX_WORD_LEN], unsigned int maxWordCount) { - char *teiler = " ;,.\n"; + char *teiler = " ;,.\r\n"; char *token; int i = 0; token = strtok(text, teiler); - while(token != NULL && i < maxWordCount) + while(token != NULL && i < (int)maxWordCount) { strncpy(words[i], token, MAX_WORD_LEN - 1); //kleinbuchstaben --> GROßBUCHSTABEN