mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
cJSON_Utils: Fix get_item_from_pointer
Accessing nested arrays didn't work as intended.
This commit is contained in:
parent
9189b3322a
commit
9abe75e072
@ -279,16 +279,17 @@ static cJSON *get_item_from_pointer(cJSON * const object, const char * pointer,
|
||||
{
|
||||
current_element = current_element->next;
|
||||
}
|
||||
/* skip to the next path token or end of string */
|
||||
while ((pointer[0] != '\0') && (pointer[0] != '/'))
|
||||
{
|
||||
pointer++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* skip to the next path token or end of string */
|
||||
while ((pointer[0] != '\0') && (pointer[0] != '/'))
|
||||
{
|
||||
pointer++;
|
||||
}
|
||||
}
|
||||
|
||||
return current_element;
|
||||
|
Loading…
Reference in New Issue
Block a user