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:58:04 -05:00
parent 51bf2c3511
commit 0207444765

View File

@@ -307,8 +307,7 @@ uint16_t APIConnection::encode_message_to_buffer(ProtoMessage &msg, uint8_t mess
}
// Encode directly into buffer
ProtoWriteBuffer buffer{&shared_buf};
msg.encode(buffer);
msg.encode({&shared_buf});
// Calculate actual encoded size (not including header that was already added)
size_t actual_payload_size = shared_buf.size() - size_before_encode;