Merge pull request #7 from DongwenHuang/master

Update cJSON.c
This commit is contained in:
Kevin Branigan 2015-06-15 10:59:20 -04:00
commit 7632993ebe

View File

@ -467,7 +467,7 @@ static char *print_object(cJSON *item,int depth,int fmt)
/* Collect all the results into our arrays: */
child=item->child;depth++;if (fmt) len+=depth;
while (child)
while (child&&!fail)
{
names[i]=str=print_string_ptr(child->string);
entries[i++]=ret=print_value(child,depth,fmt);