Fix problem MQTT gateway problem reported by @FotoFieber

http://forum.mysensors.org/topic/1870/esp8266-wifi-gateway-port-for-mysensors/138
This commit is contained in:
Henrik Ekblad
2015-10-17 22:59:01 +02:00
parent a018297240
commit 28f7a399ff
@@ -66,7 +66,7 @@ void incomingMQTT(char* topic, byte* payload,
debug(PSTR("Message arrived on topic: %s\n"), topic);
char *str, *p;
uint8_t i = 0;
for (str = strtok_r(topic, "/", &p); str && i < 5;
for (str = strtok_r(topic, "/", &p); str && i <= 5;
str = strtok_r(NULL, "/", &p)) {
switch (i) {
case 0: {