I found an implementation of sprintf and string.h for my system, in general it works fine. But if I try to output multiple uint64_t numbers, then I get a problem in the form of incorrect and too large values.
The strange thing is that the first time I get the correct string, and the second time I output a value of the same type, I get the wrong output. There are no errors in itoaUINT64.
Here my test code.
Here string.h code.
Here is the conclusion the conclusion of this test
Code: Select all
first printf
ram_available = 133692416 bytes
ram_available = 545460846592 mbytes
second my output
133692416 bytes
127 mbytes
third printf
L 123 and L 1958505086976
fourth my output
123 and 456
five printf
i 123 and i 456
six printf
I 123 and I 456