mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-26 17:46:14 +01:00
Fix handling of hex numbers to avoid extending MSB (sign bit)
Also, added format %X (unsigned long) to complement %x (unsigned int).
This commit is contained in:
parent
27ddc7b30b
commit
bd62939713
|
@ -108,7 +108,8 @@ void StringFormatter::send2(Print * stream,const FSH* format, va_list args) {
|
|||
case 'l': printPadded(stream,va_arg(args, long), formatWidth, formatLeft); break;
|
||||
case 'b': stream->print(va_arg(args, int), BIN); break;
|
||||
case 'o': stream->print(va_arg(args, int), OCT); break;
|
||||
case 'x': stream->print(va_arg(args, int), HEX); break;
|
||||
case 'x': stream->print((unsigned int)va_arg(args, unsigned int), HEX); break;
|
||||
case 'X': stream->print((unsigned long)va_arg(args, unsigned long), HEX); break;
|
||||
//case 'f': stream->print(va_arg(args, double), 2); break;
|
||||
//format width prefix
|
||||
case '-':
|
||||
|
|
Loading…
Reference in New Issue
Block a user