Fix incorrect va_start calls (#5076)

This commit is contained in:
Jeff Epler 2024-10-15 17:15:10 -05:00 committed by GitHub
parent 7fd1c334d3
commit 25b557cf46
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -290,7 +290,7 @@ void RedirectablePrint::log(const char *logLevel, const char *format, ...)
if (strcmp(logLevel, MESHTASTIC_LOG_LEVEL_TRACE) == 0) {
if (settingsStrings[traceFilename] != "") {
va_list arg;
va_start(arg, newFormat);
va_start(arg, format);
try {
traceFile << va_arg(arg, char *) << std::endl;
} catch (const std::ios_base::failure &e) {
@ -326,7 +326,7 @@ void RedirectablePrint::log(const char *logLevel, const char *format, ...)
#endif
va_list arg;
va_start(arg, newFormat);
va_start(arg, format);
log_to_serial(logLevel, newFormat, arg);
log_to_syslog(logLevel, newFormat, arg);