sw_engine: fix bug introduced in 07e73a9

The value of the variable 'i' was not modified
after the refactor, resulting in a reference to
an incorrect array element.
This commit is contained in:
Mira Grudzinska 2025-01-17 02:16:13 +01:00 committed by Hermet Park
parent df0658e2da
commit abdb96b8a0

View file

@ -844,6 +844,7 @@ bool strokeParseOutline(SwStroke* stroke, const SwOutline& outline)
ARRAY_FOREACH(p, outline.cntrs) {
auto last = *p; //index of last point in contour
auto limit = outline.pts.data + last;
++i;
//Skip empty points
if (last <= first) {
@ -860,7 +861,7 @@ bool strokeParseOutline(SwStroke* stroke, const SwOutline& outline)
if (type == SW_CURVE_TYPE_CUBIC) return false;
++types;
auto closed = outline.closed.data ? outline.closed.data[i]: false;
auto closed = outline.closed.data ? outline.closed.data[i - 1]: false;
_beginSubPath(*stroke, start, closed);