Fix tag duplication bug when track begins/ends beyond bounds

master
orwell96 2018-12-19 22:52:05 +01:00
parent 09d2302909
commit b6c5604dcf
1 changed files with 8 additions and 4 deletions

View File

@ -233,7 +233,11 @@ end
local function polyline_write(pl)
local p1y = cfactor(pl[1].y)
local str = {pl_header(p1y)}
local str = {}
if p1y <= 1 and p1y >= 0 then
table.insert(str, pl_header(p1y))
end
local i
local e
@ -260,9 +264,9 @@ local function polyline_write(pl)
end
lastcf = cf
end
if lastcf <= 1 and lastcf >= 0 then
table.insert(str, '" />\n')
end
svgfile:write(table.concat(str))
plcnt = plcnt + 1
end