From 25b557cf46489dbe39c65b31d0e2ee09dc7eb451 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 15 Oct 2024 17:15:10 -0500 Subject: [PATCH] Fix incorrect va_start calls (#5076) --- src/RedirectablePrint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RedirectablePrint.cpp b/src/RedirectablePrint.cpp index cdb191c1a..57f53019d 100644 --- a/src/RedirectablePrint.cpp +++ b/src/RedirectablePrint.cpp @@ -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);