Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 754aa9b

Browse filesBrowse files
earlephilhoweraentinger
authored andcommitted
Fix Print::print(0ULL)
Fixes #1691 To be removed once upstream bug is fixed and core-api imported: #178
1 parent 8ce59d2 commit 754aa9b
Copy full SHA for 754aa9b

File tree

1 file changed

+6
-0
lines changed
Filter options

1 file changed

+6
-0
lines changed

‎api/Print.cpp

Copy file name to clipboardExpand all lines: api/Print.cpp
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,12 @@ size_t Print::printULLNumber(unsigned long long n64, uint8_t base)
287287
uint8_t i = 0;
288288
uint8_t innerLoops = 0;
289289

290+
// Special case workaround https://github.com/arduino/ArduinoCore-API/issues/178
291+
if (n64 == 0) {
292+
write('0');
293+
return 1;
294+
}
295+
290296
// prevent crash if called with base == 1
291297
if (base < 2) base = 10;
292298

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.