From 8a6a7e0eeba46fd785ea91fc9cb53f73d3d64357 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 5 Mar 2026 15:42:53 -1000 Subject: [PATCH] Add comment noting name is always non-empty in MAC suffix path --- esphome/core/application.h | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/core/application.h b/esphome/core/application.h index ef30193607..87f9fdf59a 100644 --- a/esphome/core/application.h +++ b/esphome/core/application.h @@ -150,6 +150,7 @@ class Application { char mac_addr[mac_address_len]; get_mac_address_into_buffer(mac_addr); // Overwrite the placeholder suffix in the mutable static buffers with actual MAC + // name is always non-empty (validated by validate_hostname in Python config) memcpy(name + name_len - mac_address_suffix_len, mac_addr + mac_address_suffix_len, mac_address_suffix_len); if (friendly_name_len > 0) { memcpy(friendly_name + friendly_name_len - mac_address_suffix_len, mac_addr + mac_address_suffix_len,