Skip to content
This repository has been archived by the owner on Nov 15, 2020. It is now read-only.

Fatal error: String index is out of bounds #9

Open
LyricApps opened this issue Mar 17, 2019 · 0 comments
Open

Fatal error: String index is out of bounds #9

LyricApps opened this issue Mar 17, 2019 · 0 comments

Comments

@LyricApps
Copy link

Hi,

The following code crashes on the last line with a fatal error : String index is out of bounds instead of throwing an error

let scanner = StringScanner("1.0")
try scanner.skip(charactersIn: .whitespaces)
let red = try scanner.scanFloat()
try scanner.skip(charactersIn: .whitespaces)
let green = try scanner.scanFloat()
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant