get the read size right in extend. Thanks to xxopxe@gmail.com

This commit is contained in:
Geoff Leyland 2013-12-05 14:46:38 +13:00
parent 4856a5aca7
commit daa18891f3

View File

@ -172,7 +172,7 @@ local function separated_values_iterator(file, parameters)
local extra = anchor_pos + offset - 1 - #buffer
if extra > 0 then
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
buffer = buffer..s
end