Update Print.cpp (#3060)

#2891
This commit is contained in:
Mike Dunston 2019-08-20 06:36:04 -07:00 committed by Me No Dev
parent a5f3fc6fad
commit 007a93ec7e

View File

@ -52,7 +52,7 @@ size_t Print::printf(const char *format, ...)
va_list copy; va_list copy;
va_start(arg, format); va_start(arg, format);
va_copy(copy, arg); va_copy(copy, arg);
size_t len = vsnprintf(NULL, 0, format, arg); size_t len = vsnprintf(NULL, 0, format, copy);
va_end(copy); va_end(copy);
if(len >= sizeof(loc_buf)){ if(len >= sizeof(loc_buf)){
temp = new char[len+1]; temp = new char[len+1];