forked from OSchip/arduino_core_ch32
Print number as 0 '0' instead of empty string (#189)
Fixes https://github.com/openwch/arduino_core_ch32/issues/185
This commit is contained in:
parent
7e416ab108
commit
3c6bf0a7a3
|
@ -356,6 +356,12 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
|
||||||
uint8_t i = 0;
|
uint8_t i = 0;
|
||||||
uint8_t innerLoops = 0;
|
uint8_t innerLoops = 0;
|
||||||
|
|
||||||
|
// Special case workaround https://github.com/arduino/ArduinoCore-API/issues/178
|
||||||
|
if (n64 == 0) {
|
||||||
|
write('0');
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
// prevent crash if called with base == 1
|
// prevent crash if called with base == 1
|
||||||
if (base < 2) {
|
if (base < 2) {
|
||||||
base = 10;
|
base = 10;
|
||||||
|
|
Loading…
Reference in New Issue