mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
encoding.csv: fix bug in RandomAccessReader, spotted on windows with mingw32 (#20571)
This commit is contained in:
parent
4c47bb5288
commit
ef3b0ec775
2 changed files with 51 additions and 3 deletions
|
@ -252,7 +252,7 @@ pub fn (mut cr RandomAccessReader) map_csv() ! {
|
|||
// println("${i:-12d} of ${cr.f_len:-12d} readed: ${read_bytes_count}")
|
||||
mut p1 := p
|
||||
mut i1 := i64(0)
|
||||
for i1 <= read_bytes_count {
|
||||
for i1 < read_bytes_count {
|
||||
// println("loop char: ${*&u8(p1):c}")
|
||||
// manage quote char
|
||||
if *p1 == cr.quote {
|
||||
|
@ -529,7 +529,7 @@ pub fn (mut cr RandomAccessReader) rows_count() !i64 {
|
|||
// println("${i:-12d} of ${cr.f_len:-12d} readed: ${read_bytes_count}")
|
||||
mut p1 := p
|
||||
mut i1 := 0
|
||||
for i1 <= read_bytes_count {
|
||||
for i1 < read_bytes_count {
|
||||
if *p1 == cr.end_line {
|
||||
count++
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue