question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug in parseBase for numbers containing a dot ('0.0079')

See original GitHub issue
new BN('0.0079', 10) // <BN: ffffb22f>
new BN('0.02', 10) // <BN: ffffff3a>

_init, parseBase or _parseBase will not care if a dot is included in a base-10 input, will process it as ('.' - 48) & 0xf.

I think it should just reject such input?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
indutnycommented, Nov 29, 2017

It throws now.

0reactions
dcousenscommented, May 23, 2017

A note was added to the README at some point

Note: decimals are not supported in this library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solved: Get all the numbers including comma and dot in a s...
Currently my Regex is working but it only gets the number before comma or dot. For Ex. I have this string, "This is...
Read more >
Numbers of Insects (Species and Individuals)
The largest numbers of described species in the U.S. fall into four insect Orders: Coleoptera (beetles) at 23,700, Diptera (flies) at 19,600, Hymenoptera...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found