mirror of
https://github.com/geoffleyland/lua-csv.git
synced 2024-11-23 01:34:19 +00:00
get the read size right in extend. Thanks to xxopxe@gmail.com
This commit is contained in:
parent
4856a5aca7
commit
daa18891f3
@ -172,7 +172,7 @@ local function separated_values_iterator(file, parameters)
|
|||||||
local extra = anchor_pos + offset - 1 - #buffer
|
local extra = anchor_pos + offset - 1 - #buffer
|
||||||
if extra > 0 then
|
if extra > 0 then
|
||||||
local size = math.ceil(extra / buffer_size) * buffer_size
|
local size = math.ceil(extra / buffer_size) * buffer_size
|
||||||
local s = file:read(buffer_size)
|
local s = file:read(size)
|
||||||
if not s then return end
|
if not s then return end
|
||||||
buffer = buffer..s
|
buffer = buffer..s
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user