Fix tag duplication bug when track begins/ends beyond bounds
This commit is contained in:
		
							parent
							
								
									09d2302909
								
							
						
					
					
						commit
						b6c5604dcf
					
				
							
								
								
									
										10
									
								
								main.lua
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								main.lua
									
									
									
									
									
								
							| @ -233,7 +233,11 @@ end | |||||||
| 
 | 
 | ||||||
| local function polyline_write(pl) | local function polyline_write(pl) | ||||||
| 	local p1y = cfactor(pl[1].y) | 	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 i | ||||||
| 	local e | 	local e | ||||||
| @ -260,9 +264,9 @@ local function polyline_write(pl) | |||||||
| 		end | 		end | ||||||
| 		lastcf = cf | 		lastcf = cf | ||||||
| 	end | 	end | ||||||
| 	 | 	if lastcf <= 1 and lastcf >= 0 then | ||||||
| 		table.insert(str, '" />\n') | 		table.insert(str, '" />\n') | ||||||
| 	 | 	end | ||||||
| 	svgfile:write(table.concat(str)) | 	svgfile:write(table.concat(str)) | ||||||
| 	plcnt = plcnt + 1 | 	plcnt = plcnt + 1 | ||||||
| end | end | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 orwell96
						orwell96