diff --git a/Source/svg/SVGParser.swift b/Source/svg/SVGParser.swift index 19086199..83cae5af 100644 --- a/Source/svg/SVGParser.swift +++ b/Source/svg/SVGParser.swift @@ -1404,14 +1404,23 @@ private class PathDataReader { var result = [PathSegment]() let data = readData() var index = 0 - while (index < data.count) { + var isFirstSegment = true + while index < data.count { let end = index + count - if (end > data.count) { + if end > data.count { // TODO need to generate error: // "Path '\(type)' has invalid number of arguments: \(data.count)" break } - result.append(PathSegment(type: type, data: Array(data[index..