mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-05 09:55:41 +02:00
Fix a line simplification crash when a segment degenerates to a single point
This commit is contained in:
+3
-1
@@ -831,7 +831,9 @@ drawvec simplify_lines(drawvec &geom, int z, int detail) {
|
||||
geom[i].necessary = 1;
|
||||
geom[j - 1].necessary = 1;
|
||||
|
||||
douglas_peucker(geom, i, j - i, res);
|
||||
if (j - i > 1) {
|
||||
douglas_peucker(geom, i, j - i, res);
|
||||
}
|
||||
i = j - 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user