earcut: fix inverted conditional in z-order index curve hashing

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-11-06 13:42:54 -07:00
parent 8b44cfe49b
commit 2d705a8c3e

View file

@ -443,7 +443,7 @@ pub fn Processor(comptime T: type) type {
p.prev_z[n] = p.prev[n]; p.prev_z[n] = p.prev[n];
p.next_z[n] = p.next[n]; p.next_z[n] = p.next[n];
n = p.next[n]; n = p.next[n];
if (n != start) break; if (n == start) break;
} }
p.next_z[p.prev_z[n].?] = null; p.next_z[p.prev_z[n].?] = null;