You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to print a u32 variable above 65535 (u16::MAX), the value wraps to a lower value below 65535. This also occurs with i32 overflowing at i16::MAX.
I got the same issue writing code for the 6502. I think I've figured out the problem, and it's that the implementation for printing 32-bit integers casts them to a usize first. I have no idea why it would be implemented in such a non-portable way.
When I try to print a u32 variable above 65535 (
u16::MAX
), the value wraps to a lower value below 65535. This also occurs with i32 overflowing ati16::MAX
.I made a reproduction here: https://github.com/crclark96/ufmt-i32-print-repro, but I'll copy main source file and output below:
Output:
The text was updated successfully, but these errors were encountered: