Skip to content

Bug report: fromDecimal(...) function does not correctly handle delim parameter passed as default ("Auto") #2217

@GCHQDeveloper581

Description

@GCHQDeveloper581

Describe the bug
When fromDecimal is called without specifying a value for the "delim" parameter, or when delim is passed as "Auto" it will only parse the first number in the passed text ignoring any further numbers whatever separator has been used.

To Reproduce
Steps to reproduce the behaviour or a link to the recipe / input used to cause the bug:

See bug report #2139 which arises as a consequence of this issue.

Expected behaviour
delim = "Auto" case should be handled correctly, in a manner similar to the fromHex(...) function.

Additional context
fromHex could be used as a guide towards a correct implementation, noting that there are other differences because pairs of hex digits can be packed exactly into bytes whereas for decimal up to 3 digits can be required.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions