Buffer reset gelöscht
This commit is contained in:
1 file changed
+1
-2
@@ -63,8 +63,7 @@ llist *write_csv_to_llist(const char *filename) {
|
|||||||
int count = 0; // task counter
|
int count = 0; // task counter
|
||||||
fgets(line, sizeof(line), file); // read and ignore file head
|
fgets(line, sizeof(line), file); // read and ignore file head
|
||||||
|
|
||||||
while (fgets(line, sizeof(line), file)) {
|
while (fgets(line, sizeof(line), file));
|
||||||
memset(line, 0, sizeof(line));
|
|
||||||
count++;
|
count++;
|
||||||
// remove newline sign
|
// remove newline sign
|
||||||
line[strcspn(line, "\n")] = '\0';
|
line[strcspn(line, "\n")] = '\0';
|
||||||
|
|||||||
Reference in new issue
Block a user