From deff1c4bc7fe9f5a7ca7f6b7fbbda40e88f7c50b Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 13 Aug 2025 22:53:12 -0500 Subject: [PATCH] preen --- esphome/components/api/api_connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index 81cac8fa79..c8600048f7 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -281,7 +281,7 @@ uint16_t APIConnection::encode_message_to_buffer(ProtoMessage &msg, uint8_t mess const uint8_t header_padding = conn->helper_->frame_header_padding(); const uint8_t footer_size = conn->helper_->frame_footer_size(); - // Calculate total size with padding + // Calculate total size with padding for buffer allocation size_t total_calculated_size = calculated_size + header_padding + footer_size; // Check if it fits