From b8d246b706d11df926c35b8f500a0f2b602c0e1a Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 27 Dec 2025 18:24:01 -1000 Subject: [PATCH] fix --- 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 22bf869c53..239c735354 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -1525,7 +1525,7 @@ void APIConnection::complete_authentication_() { bool APIConnection::send_hello_response(const HelloRequest &msg) { // Copy client name with truncation if needed (set_client_name handles truncation) - this->helper_->set_client_name(msg.client_info.c_str(), msg.client_info.size()); + this->helper_->set_client_name(reinterpret_cast(msg.client_info), msg.client_info_len); this->client_api_version_major_ = msg.api_version_major; this->client_api_version_minor_ = msg.api_version_minor; char peername[socket::PEERNAME_MAX_LEN];