소스 검색

Update cJSON.c

DongwenHuang 10 년 전
부모
커밋
10b888be54
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      cJSON.c

+ 1 - 1
cJSON.c

@@ -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);