From f5eb894b8aca531b2ff76f62828cabbf452627da Mon Sep 17 00:00:00 2001 From: Pavel Zbitskiy Date: Thu, 1 Aug 2024 20:46:49 -0400 Subject: [PATCH] Fix invalid strcat usage --- main/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/main.cpp b/main/main.cpp index bbfbb94..cc50292 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -2533,7 +2533,9 @@ void mqttCallback(const char *topic, const uint8_t *payload, const unsigned int } else { - mqttClient->publish(ha_debug_logs_topic.c_str(), 1, false, strcat((char *)"heatpump: wrong mqtt topic: ", topic)); + String msg("heatpump: wrong mqtt topic: "); + msg += topic; + mqttClient->publish(ha_debug_logs_topic.c_str(), 1, false, msg.c_str()); } if (update)