SvgLoader: Fix typo (SCubic draw)

Change-Id: Id54cf6a7ca66cdbc96cfb93143aacccab95de822
This commit is contained in:
JunsuChoi 2020-07-09 15:40:21 +09:00
parent 84af527a27
commit 581451ea8d

View file

@ -328,9 +328,9 @@ static void _processCommand(vector<PathCommand>* cmds, vector<Point>* pts, char
case 's':
case 'S': {
Point p[3], ctrl;
if ((cmds->size() > 1) && (cmds->at(cmds->size() - 2) == PathCommand::CubicTo)) {
if ((cmds->size() > 1) && (cmds->at(cmds->size() - 1) == PathCommand::CubicTo)) {
ctrl.x = 2 * cur->x - curCtl->x;
ctrl.y = 2 * cur->x - curCtl->y;
ctrl.y = 2 * cur->y - curCtl->y;
} else {
ctrl = *cur;
}