From b5a69ef88aa196c45bd47ed8d9750cb4cc4e39fe Mon Sep 17 00:00:00 2001 From: foorschtbar Date: Mon, 6 Nov 2023 11:28:12 +0100 Subject: [PATCH] Fixed JSON length mismatch function --- src/PixelIt.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PixelIt.ino b/src/PixelIt.ino index 24b5ff7..aac1632 100644 --- a/src/PixelIt.ino +++ b/src/PixelIt.ino @@ -1149,9 +1149,9 @@ void callback(char *topic, byte *payload, unsigned int length) Log("MQTT_callback", "Incoming JSON (Topic: " + String(topic) + ", Length: " + String(length) + "/" + String(json.measureLength()) + ") "); - if (length != json.measureLength()) + if (json.measureLength() == 2) { - Log("MQTT_callback", "JSON length mismatch! JSON Message to long :("); + Log("MQTT_callback", "JSON message empty or too long"); return; } if (channel.equals("setScreen"))