Correct maximum size of snprintf (use same size as the buffer ;)

This commit is contained in:
bwibwi13 2018-08-19 08:39:39 +02:00
parent 54be6e87db
commit c87c9a47b3

View File

@ -124,7 +124,7 @@ void loop() {
if (now - lastMsg > 2000) {
lastMsg = now;
++value;
snprintf (msg, 75, "hello world #%ld", value);
snprintf (msg, 50, "hello world #%ld", value);
Serial.print("Publish message: ");
Serial.println(msg);
client.publish("outTopic", msg);