Buffer reset eingefügt
parent
6f3cd456f4
commit
2d0bd1341b
3
src/db.c
3
src/db.c
|
@ -64,6 +64,7 @@ llist *write_csv_to_llist(const char *filename) {
|
|||
fgets(line, sizeof(line), file); // read and ignore file head
|
||||
|
||||
while (fgets(line, sizeof(line), file)) {
|
||||
memset(line, 0, sizeof(line));
|
||||
count++;
|
||||
// remove newline sign
|
||||
line[strcspn(line, "\n")] = '\0';
|
||||
|
@ -74,7 +75,7 @@ llist *write_csv_to_llist(const char *filename) {
|
|||
char *taskdeadline_dateSTR = strtok(NULL, ",");
|
||||
char *taskprioritySTR = strtok(NULL, ",");
|
||||
char *taskspareSTR = strtok(NULL, ",");
|
||||
printf(" Der Name des Task ist %s",taskname);
|
||||
printf(" Der Name des Task ist %s\n",taskname);
|
||||
|
||||
// convert char in integer and date
|
||||
unsigned long int taskcreation_date =
|
||||
|
|
Loading…
Reference in New Issue