Merge branch 'bugfix' of https://gitea.fhgr.ch/schurtisimon/StudyPlanner into bugfix
commit
1f54110aa5
2
src/db.c
2
src/db.c
|
@ -64,7 +64,6 @@ 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';
|
||||
|
@ -102,3 +101,4 @@ llist *write_csv_to_llist(const char *filename) {
|
|||
}
|
||||
return list; // null on error
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue