Limit percent value from 0 to 100.
This commit is contained in:
parent
04943d8f63
commit
8262760bc7
1 changed files with 1 additions and 0 deletions
|
@ -182,6 +182,7 @@ extension Scanner {
|
||||||
}
|
}
|
||||||
|
|
||||||
if string("%") {
|
if string("%") {
|
||||||
|
guard 0...100 ~= int else { return nil }
|
||||||
int = int * 0xFF / 100
|
int = int * 0xFF / 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue