Fix return of Print::print(timeinfo, format) (#3189)

This commit is contained in:
Me No Dev 2019-09-09 00:36:30 +03:00 committed by GitHub
parent 717ca79ecb
commit 5f77b0108b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)