1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 11:52:20 +01:00
This commit is contained in:
J. Nick Koston
2025-08-13 22:53:12 -05:00
parent d37390412c
commit deff1c4bc7

View File

@@ -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