Skip to content

Commit

Permalink
🐛 Fix truncated IP (#318)
Browse files Browse the repository at this point in the history
published IP is truncated.
  • Loading branch information
bertmelis authored and marvinroger committed Mar 10, 2017
1 parent 2564160 commit ad58871
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Homie/Boot/BootNormal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ void BootNormal::_onMqttConnected() {

IPAddress localIp = WiFi.localIP();
char localIpStr[MAX_IP_STRING_LENGTH];
snprintf(localIpStr, MAX_IP_STRING_LENGTH - 1, "%d.%d.%d.%d", localIp[0], localIp[1], localIp[2], localIp[3]);
snprintf(localIpStr, MAX_IP_STRING_LENGTH, "%d.%d.%d.%d", localIp[0], localIp[1], localIp[2], localIp[3]);

Interface::get().getMqttClient().publish(_prefixMqttTopic(PSTR("/$localip")), 1, true, localIpStr);

Expand Down

0 comments on commit ad58871

Please sign in to comment.