Skip to content

Commit

Permalink
Fix incorrect va_start calls (meshtastic#5076)
Browse files Browse the repository at this point in the history
  • Loading branch information
jepler authored Oct 15, 2024
1 parent 7fd1c33 commit 25b557c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RedirectablePrint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 25b557c

Please sign in to comment.