Skip to content

Commit 5f77b01

Browse files
authored
Fix return of Print::print(timeinfo, format) (#3189)
1 parent 717ca79 commit 5f77b01

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cores/esp32/Print.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,10 @@ size_t Print::print(struct tm * timeinfo, const char * format)
159159
}
160160
char buf[64];
161161
size_t written = strftime(buf, 64, f, timeinfo);
162-
print(buf);
163-
return written;
162+
if(written == 0){
163+
return written;
164+
}
165+
return print(buf);
164166
}
165167

166168
size_t Print::println(void)

0 commit comments

Comments
 (0)