فهرست منبع

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';}