diff --git a/Network.cpp b/Network.cpp index a5a0dc5..e165a5c 100644 --- a/Network.cpp +++ b/Network.cpp @@ -257,14 +257,14 @@ void Network::buildMqttPath(const char* prefix, const char* path, char* outPath) } i=0; - while(outPath[i] != 0x00) + while(path[i] != 0x00) { outPath[offset] = path[i]; ++i; ++offset; } - outPath[i+1] = 0x00; + outPath[offset] = 0x00; } void Network::registerMqttReceiver(MqttReceiver* receiver) diff --git a/NetworkOpener.cpp b/NetworkOpener.cpp index 0f0d3f3..8b66239 100644 --- a/NetworkOpener.cpp +++ b/NetworkOpener.cpp @@ -425,13 +425,13 @@ void NetworkOpener::buildMqttPath(const char* path, char* outPath) ++offset; } int i=0; - while(outPath[i] != 0x00) + while(path[i] != 0x00) { outPath[offset] = path[i]; ++i; ++offset; } - outPath[i+1] = 0x00; + outPath[offset] = 0x00; } void NetworkOpener::subscribe(const char *path) diff --git a/Version.h b/Version.h index d51f2ef..505d2ca 100644 --- a/Version.h +++ b/Version.h @@ -1,3 +1,3 @@ #pragma once -#define nuki_hub_version "6.0" \ No newline at end of file +#define nuki_hub_version "6.1" \ No newline at end of file