Skip to content

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

@axic

Description

@axic
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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions