fix corner case with identical offset fill points

This commit is contained in:
Stewart Allen 2020-05-06 14:54:03 -04:00
commit 7b2a2d32e1
2 changed files with 11 additions and 0 deletions

View file

@ -769,6 +769,13 @@ let gs_kiri_print = exports;
// go back to start and try again
if (!found) {
if (start === 0 && lastIndex === -1) {
console.log('infinite loop', lines, {
marked, options, i, group, start, lastIndex,
points: lines.map(p => p.index).join(', ')
});
break;
}
start = 0;
lastIndex = -1;
continue;