Fix Timer invalid JSON message when too long

Fix Timer invalid JSON message when too long (#2447)
This commit is contained in:
Theo Arends 2018-04-21 13:10:44 +02:00
parent 51b333348c
commit 6bb0f034c3

View File

@ -345,7 +345,7 @@ boolean TimerCommand()
}
} else {
if (devices_present) {
StaticJsonBuffer<128> jsonBuffer;
StaticJsonBuffer<200> jsonBuffer;
JsonObject& root = jsonBuffer.parseObject(dataBufUc);
if (!root.success()) {
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_TIMER "%d\":\"" D_JSON_INVALID_JSON "\"}"), index); // JSON decode failed