Skip to content

Commit

Permalink
bugfix: print(0ULL) output nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
warmonkey committed Nov 3, 2024
1 parent 049a8c8 commit 9333e7f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cores/arduino/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
uint8_t i = 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
if (base < 2) {
base = 10;
Expand Down

0 comments on commit 9333e7f

Please sign in to comment.