fix 'off by one' error for emtpy scripts.

This commit is contained in:
tdijck 2015-03-25 13:10:27 -07:00 committed by Tom van Dijck
parent 1738c13263
commit 9b2c8c3c9a

View File

@ -49,6 +49,7 @@
local max = 4096
local start = 1
local len = contents:len()
if len > 0 then
while start <= len do
local n = len - start
if n > max then n = max end
@ -64,6 +65,9 @@
start = finish + 1
end
else
table.insert(result, "\t\"\",")
end
table.insert(result, "")
end