Skip to content

[bug/improvement] bad print/println report due to transtyping #347

Open
@siteswapjuggler

Description

@siteswapjuggler

Hello,

I spotted some unexpected behaviour with the print and println functions.

First issue the int64_t and uint64_t are not supported.

Seconde issue (the most important to me) char and int with negative value gives unexpected result in HEX, OCT and BIN format due to the unsigned long cast before the private printNumber method.

Doing so printing a char equal to -128 in HEX format gives FFFFFF80 instead of 80 and gives 11111111111111111111111110000000 instead of 1000000.

I'm actually looking to a way to improve that but perhaps you came to this behaviour on purpose. I assume HEX and BIN to be usefull to reflect the content of the actual bytes and not only a transcription of it's value.

What do you think ?
bugtest_v2.zip

PS : I came to a solution while writing this, I can share or pull request if you think it worth it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions