Skip to content

Commit

Permalink
sheet: Fix bug in \r\n line handling
Browse files Browse the repository at this point in the history
  • Loading branch information
richiejp committed Dec 11, 2024
1 parent d8cc28b commit 7f56aaf
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions app/utils/index.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,10 @@ static enum zsv_index_status seek_and_check_newline(long *offset, struct zsv_opt
if (new_line[0] == '\n') {
*offset += 1;
} else if (new_line[0] == '\r') {
if (new_line[1] == '\n') {
*offset += 1;
return zsv_index_status_ok;
}

*offset += 1;

if (new_line[1] == '\n')
*offset += 1;
} else {
return zsv_index_status_error;
}
Expand Down

0 comments on commit 7f56aaf

Please sign in to comment.