소스 검색

fix non-explicit cast

git-svn-id: http://svn.code.sf.net/p/cjson/code@52 e3330c51-1366-4df0-8b21-3ccf24e3d50e
Dave Gamble 12 년 전
부모
커밋
2c9474e9e3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      cJSON.c

+ 1 - 1
cJSON.c

@@ -438,7 +438,7 @@ static char *print_object(cJSON *item,int depth,int fmt)
 	/* Explicitly handle empty object case */
 	if (!numentries)
 	{
-		out=cJSON_malloc(fmt?depth+3:3);
+		out=(char*)cJSON_malloc(fmt?depth+3:3);
 		if (!out)	return 0;
 		ptr=out;*ptr++='{';
 		if (fmt) {*ptr++='\n';for (i=0;i<depth-1;i++) *ptr++='\t';}