mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
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:
parent
df0658e2da
commit
abdb96b8a0
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue