From f0199d5de9ff371b2f1903d3e616dac3f1d4701e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 4 Feb 2026 05:57:38 +0100 Subject: [PATCH] wip --- esphome/components/logger/logger.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/esphome/components/logger/logger.h b/esphome/components/logger/logger.h index 3df210c915..623e8ed1b6 100644 --- a/esphome/components/logger/logger.h +++ b/esphome/components/logger/logger.h @@ -203,15 +203,13 @@ struct LogBuffer { this->put_char_(' '); } void HOT format_body(const char *format, va_list args) { - if (this->full_()) - return; - this->process_vsnprintf_result_(vsnprintf(this->current_(), this->remaining_(), format, args)); + if (!this->full_()) + this->process_vsnprintf_result_(vsnprintf(this->current_(), this->remaining_(), format, args)); } #ifdef USE_STORE_LOG_STR_IN_FLASH void HOT format_body_P(PGM_P format, va_list args) { - if (this->full_()) - return; - this->process_vsnprintf_result_(vsnprintf_P(this->current_(), this->remaining_(), format, args)); + if (!this->full_()) + this->process_vsnprintf_result_(vsnprintf_P(this->current_(), this->remaining_(), format, args)); } #endif