mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Readme: Fix #143 item->name --> item->string
This commit is contained in:
parent
795c3acabe
commit
ab8489a851
@ -240,8 +240,8 @@ void parse_and_callback(cJSON *item, const char *prefix)
|
|||||||
{
|
{
|
||||||
while (item)
|
while (item)
|
||||||
{
|
{
|
||||||
char *newprefix = malloc(strlen(prefix) + strlen(item->name) + 2);
|
char *newprefix = malloc(strlen(prefix) + strlen(item->string) + 2);
|
||||||
sprintf(newprefix, "%s/%s", prefix, item->name);
|
sprintf(newprefix, "%s/%s", prefix, item->string);
|
||||||
int dorecurse = callback(newprefix, item->type, item);
|
int dorecurse = callback(newprefix, item->type, item);
|
||||||
if (item->child && dorecurse)
|
if (item->child && dorecurse)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user