Skip to content

Commit

Permalink
Fixed JSON length mismatch function
Browse files Browse the repository at this point in the history
  • Loading branch information
foorschtbar committed Nov 6, 2023
1 parent 840db1e commit b5a69ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PixelIt.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit b5a69ef

Please sign in to comment.