mirror of
https://github.com/DaveGamble/cJSON
synced 2024-12-24 15:42:07 +00:00
fix non-explicit cast
git-svn-id: http://svn.code.sf.net/p/cjson/code@52 e3330c51-1366-4df0-8b21-3ccf24e3d50e
This commit is contained in:
parent
02a1e544f7
commit
2c9474e9e3
2
cJSON.c
2
cJSON.c
@ -438,7 +438,7 @@ static char *print_object(cJSON *item,int depth,int fmt)
|
|||||||
/* Explicitly handle empty object case */
|
/* Explicitly handle empty object case */
|
||||||
if (!numentries)
|
if (!numentries)
|
||||||
{
|
{
|
||||||
out=cJSON_malloc(fmt?depth+3:3);
|
out=(char*)cJSON_malloc(fmt?depth+3:3);
|
||||||
if (!out) return 0;
|
if (!out) return 0;
|
||||||
ptr=out;*ptr++='{';
|
ptr=out;*ptr++='{';
|
||||||
if (fmt) {*ptr++='\n';for (i=0;i<depth-1;i++) *ptr++='\t';}
|
if (fmt) {*ptr++='\n';for (i=0;i<depth-1;i++) *ptr++='\t';}
|
||||||
|
Loading…
Reference in New Issue
Block a user