From c928fc14dc5459bb4e6ae63a030d6cc0ca46beeb Mon Sep 17 00:00:00 2001 From: Evon Silvia Date: Tue, 3 Nov 2020 16:42:15 -0800 Subject: [PATCH] Fixed issue-16 Fixes #16 to prevent infinite recursion when a triangle was previously deleted from hull_next. Port of fix in original JavaScript https://github.com/mapbox/delaunator/issues/44 --- include/delaunator.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/delaunator.hpp b/include/delaunator.hpp index 6bc5221..1c77d7c 100644 --- a/include/delaunator.hpp +++ b/include/delaunator.hpp @@ -508,7 +508,7 @@ std::size_t Delaunator::legalize(std::size_t a) { hull_tri[e] = a; break; } - e = hull_next[e]; + e = hull_prev[e]; } while (e != hull_start); } link(a, hbl);