From 5f77b0108b964fb929a2c4b7f892de61cc2a8e59 Mon Sep 17 00:00:00 2001 From: Me No Dev Date: Mon, 9 Sep 2019 00:36:30 +0300 Subject: [PATCH] Fix return of Print::print(timeinfo, format) (#3189) --- cores/esp32/Print.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cores/esp32/Print.cpp b/cores/esp32/Print.cpp index 76b00aa3..60964703 100644 --- a/cores/esp32/Print.cpp +++ b/cores/esp32/Print.cpp @@ -159,8 +159,10 @@ size_t Print::print(struct tm * timeinfo, const char * format) } char buf[64]; size_t written = strftime(buf, 64, f, timeinfo); - print(buf); - return written; + if(written == 0){ + return written; + } + return print(buf); } size_t Print::println(void)