From c5d4a1f7a6b7885afc33cf5c09fe608e5cf5af80 Mon Sep 17 00:00:00 2001 From: reaper7 Date: Tue, 4 Jun 2019 08:26:18 +0200 Subject: [PATCH] Fix mqtt topic with ending slash (#1755) --- code/espurna/mqtt.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/espurna/mqtt.ino b/code/espurna/mqtt.ino index 17a5ba1b..aa344b4b 100644 --- a/code/espurna/mqtt.ino +++ b/code/espurna/mqtt.ino @@ -254,7 +254,7 @@ void _mqttConfigure() { // Get base topic and apply placeholders { String topic = getSetting("mqttTopic", MQTT_TOPIC); - if (topic.endsWith("/")) topic.remove(_mqtt_topic.length()-1); + if (topic.endsWith("/")) topic.remove(topic.length()-1); // Replace things inside curly braces (like {hostname}, {mac} etc.) _mqttPlaceholders(topic);