From 2d0bd1341b55256e2ac6b8b1f995ce80a8bb58da Mon Sep 17 00:00:00 2001 From: wildjan Date: Mon, 16 Dec 2024 10:40:08 +0100 Subject: [PATCH] =?UTF-8?q?Buffer=20reset=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/db.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/db.c b/src/db.c index 73af081..300b1a1 100644 --- a/src/db.c +++ b/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 =