From c990f0c0cabee07c56c8c2b814762b7610a77536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Mon, 15 Jan 2018 22:47:37 +0100 Subject: [PATCH] Fix the mqttTopicKey method --- code/espurna/mqtt.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/espurna/mqtt.ino b/code/espurna/mqtt.ino index 90de7202..4661d899 100644 --- a/code/espurna/mqtt.ino +++ b/code/espurna/mqtt.ino @@ -389,8 +389,8 @@ String mqttTopicKey(char * topic) { String response = String(topic); if (response.startsWith(start) && response.endsWith(end)) { - response.remove(0, position); - response.remove(position + 1); + response.replace(start, ""); + response.replace(end, ""); } else { response = String(); }