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

fix(core): block FromStr implementation #2155

Merged
merged 1 commit into from Feb 14, 2023

Conversation

DaniPopes
Copy link
Collaborator

Motivation

Numbers get parsed first as hex, so a decimal number is default treated as hex

Solution

only parse as hex if prefixed by 0x
the prefix is handled by U64::from_str
only downside to current fix is that a non-prefixed hex gets parsed as decimal, ex: a is invalid while 0xa is valid

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

@gakonst gakonst merged commit a69036f into gakonst:master Feb 14, 2023
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 this pull request may close these issues.

None yet

2 participants