I'm trying to output a byte as a hex value with zero padding. I do something 
like this:

        uint8_t val = 4;
        int len = snprintf((char*) sBuf, 64, "%02x\r\n", val);

But when I do this, the output I get is "4", not "04".

This is with the minimal library.

Trying with the floating point version, it seems to work correctly.

Is this a bug?

-- 
Rick


_______________________________________________
AVR-chat mailing list
AVR-chat@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-chat

Reply via email to