Skip to content

Size calculation in pub fn to_str_radix #63

@Phaiax

Description

@Phaiax

Here, num_base_digits is called with size()-1:

https://github.com/Aatch/ramp/blob/master/src/int.rs#L275

So if the Int has one limb, num_base_digits is called with n=0, that will cause return 1 independent of base.

https://github.com/Aatch/ramp/blob/master/src/ll/base.rs#L48


I just found another related problem, but that would better be part of another issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions