Skip to content

Commit 8581dce

Browse files
committed
remove implicitly dos ending lines
1 parent 11e24d2 commit 8581dce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/table.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,12 @@ readfile(Options *opts, DataDesc *desc, StateData *state)
796796
read -= 1;
797797
}
798798

799+
if (line && read > 0 && line[read - 1] == '\r')
800+
{
801+
line[read - 1] = '\0';
802+
read -= 1;
803+
}
804+
799805
/*
800806
* In streaming mode go out when you find empty row.
801807
*

0 commit comments

Comments
 (0)