mirror of
https://github.com/exyte/Macaw.git
synced 2024-10-26 04:49:57 +03:00
Fix #395: add type == .A
This commit is contained in:
parent
018bca18c0
commit
8affa6f988
@ -1681,7 +1681,7 @@ private class PathDataReader {
|
|||||||
|
|
||||||
var chars = [ch]
|
var chars = [ch]
|
||||||
var hasDot = 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 {
|
while let ch = readDigit(&hasDot), !isFlag {
|
||||||
chars.append(ch)
|
chars.append(ch)
|
||||||
@ -1692,15 +1692,12 @@ private class PathDataReader {
|
|||||||
guard let value = Double(buf) else {
|
guard let value = Double(buf) else {
|
||||||
return .none
|
return .none
|
||||||
}
|
}
|
||||||
|
|
||||||
guard isFlag else {
|
guard isFlag else {
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
guard value == 0 || value == 1 else {
|
guard value == 0 || value == 1 else {
|
||||||
return .none
|
return .none
|
||||||
}
|
}
|
||||||
|
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user