Merge pull request #9365 from s-hadinger/fix_rules_jsmn

Fix compilation error in Rules
This commit is contained in:
s-hadinger 2020-09-23 10:13:57 +02:00 committed by GitHub
commit 18f36c6f4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1078,7 +1078,7 @@ bool RulesMqttData(void)
if ((dot = key1.indexOf('.')) > 0) {
key2 = key1.substring(dot+1);
key1 = key1.substring(0, dot);
JsonParserToken value_tok = jsonData[key1.c_str()][key2.c_str()];
JsonParserToken value_tok = jsonData[key1.c_str()].getObject()[key2.c_str()];
if (!value_tok) break; //Failed to get the key/value, ignore this message.
value = value_tok.getStr();
// if (!jsonData[key1][key2].success()) break; //Failed to get the key/value, ignore this message.