lib: json: Fix parsing of boolean values
Boolean values were being decoded using the descriptor type rather than the value type. Jira: ZEP-1607 Change-Id: I0c9324ee705af973ccf738e92785820c3a5fb692 Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
This commit is contained in:
parent
4c7803b59f
commit
262365c727
|
@ -449,9 +449,9 @@ static int decode_value(struct json_obj *obj,
|
|||
descr->n_elements, field, val);
|
||||
case JSON_TOK_FALSE:
|
||||
case JSON_TOK_TRUE: {
|
||||
bool *value = field;
|
||||
bool *v = field;
|
||||
|
||||
*value = descr->type == JSON_TOK_TRUE;
|
||||
*v = value->type == JSON_TOK_TRUE;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue