Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Reject decimal input#91

Closed
axic wants to merge 3 commits into
indutny:masterfrom
axic:patch/reject-decimals
Closed

Reject decimal input#91
axic wants to merge 3 commits into
indutny:masterfrom
axic:patch/reject-decimals

Conversation

@axic

@axic axic commented Dec 19, 2015

Copy link
Copy Markdown
Contributor

As discussed in #90

@indutny

indutny commented Dec 19, 2015

Copy link
Copy Markdown
Owner

Does it affect benchmarks?

@axic

axic commented Jan 24, 2016

Copy link
Copy Markdown
Contributor Author

Seems like my comments didn't get posted here back in December. Unfortunately it does affect benchmarks so I was thinking about others ways to do it. Perhaps the best would be having two input functions: a safe (for "user input") and an unsafe one (for speed, e.g. the current implementation).

Any ideas about an API for the above?

@indutny

indutny commented Jan 24, 2016

Copy link
Copy Markdown
Owner

I'm not sure about it myself. Perhaps, BN.checkedFrom(string, 'hex')?

@axic axic mentioned this pull request Feb 1, 2016
@indutny

indutny commented Feb 9, 2016

Copy link
Copy Markdown
Owner

Preemptively added semver-major tag per your request.

@fanatid

fanatid commented Mar 28, 2016

Copy link
Copy Markdown
Collaborator

Why not land this PR in 4.x?
@axic I think only safe should be here

@indutny

indutny commented Nov 29, 2017

Copy link
Copy Markdown
Owner

Landed test in 9173bc2, the issue was fixed in different commit. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants