Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String parser accepts some corrupt data. #36

Closed
decafbad opened this issue Nov 1, 2019 · 0 comments · Fixed by #37
Closed

String parser accepts some corrupt data. #36

decafbad opened this issue Nov 1, 2019 · 0 comments · Fixed by #37

Comments

@decafbad
Copy link

decafbad commented Nov 1, 2019

I need fractions for an app so I checked if I could use this lib.

> jsbi.BigInt(" 123234 ")
JSBI [ 123234, sign: false ]
> jsbi.BigInt(" 123234x")
Thrown:
SyntaxError: Cannot convert  123234x to a BigInt
> jsbi.BigInt(" 123234 x")
JSBI [ 123234, sign: false ]
> jsbi.BigInt(" 123234 ?")
JSBI [ 123234, sign: false ]
> jsbi.BigInt(" 123234 ?a")
Thrown:
SyntaxError: Cannot convert  123234 ?a to a BigInt
jakobkummerow added a commit that referenced this issue Nov 2, 2019
When there was whitespace and then a single character of non-whitespace
trailing garbage after the BigInt, we failed to look at that last character.

Fixes #36.
mathiasbynens pushed a commit that referenced this issue Nov 2, 2019
When there was whitespace and then a single character of non-whitespace
trailing garbage after the BigInt, we failed to look at that last character.

Fixes #36.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant