From 8affa6f988825f6051588861146b9331df350da7 Mon Sep 17 00:00:00 2001 From: Daniil Manin Date: Thu, 23 May 2019 19:18:25 +0700 Subject: [PATCH] Fix #395: add type == .A --- Source/svg/SVGParser.swift | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/svg/SVGParser.swift b/Source/svg/SVGParser.swift index a831fb0a..2ddc0642 100644 --- a/Source/svg/SVGParser.swift +++ b/Source/svg/SVGParser.swift @@ -1681,7 +1681,7 @@ private class PathDataReader { var chars = [ch] var hasDot = ch == "." - let isFlag = type == .a && (index == 3 || index == 4) + let isFlag = (type == .a || type == .A) && (index == 3 || index == 4) while let ch = readDigit(&hasDot), !isFlag { chars.append(ch) @@ -1692,15 +1692,12 @@ private class PathDataReader { guard let value = Double(buf) else { return .none } - guard isFlag else { return value } - guard value == 0 || value == 1 else { return .none } - return value }