1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-08-15 16:10:39 +03:00

Fix #395: add type == .A

This commit is contained in:
Daniil Manin 2019-05-23 19:18:25 +07:00
parent 018bca18c0
commit 8affa6f988

View File

@ -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
}