Buffer reset gelöscht

bugfix
Jan Wild 2024-12-16 10:41:51 +01:00
parent 2d0bd1341b
commit 14705844d7
No known key found for this signature in database
GPG Key ID: 0BCB2E053F2192BB
1 changed files with 1 additions and 2 deletions

View File

@ -63,8 +63,7 @@ llist *write_csv_to_llist(const char *filename) {
int count = 0; // task counter
fgets(line, sizeof(line), file); // read and ignore file head
while (fgets(line, sizeof(line), file)) {
memset(line, 0, sizeof(line));
while (fgets(line, sizeof(line), file));
count++;
// remove newline sign
line[strcspn(line, "\n")] = '\0';