1
0
mirror of https://github.com/DaveGamble/cJSON synced 2024-12-24 23:52:07 +00:00

Don't crash if someone calls cJSON_Print(0);

git-svn-id: http://svn.code.sf.net/p/cjson/code@24 e3330c51-1366-4df0-8b21-3ccf24e3d50e
This commit is contained in:
Dave Gamble 2009-11-26 20:17:25 +00:00
parent 091c0676c1
commit 37963a72b9

View File

@ -256,6 +256,7 @@ static const char *parse_value(cJSON *item,const char *value)
// Render a value to text.
static char *print_value(cJSON *item,int depth,int fmt)
{
if (!item) return 0;
char *out=0;
switch ((item->type)&255)
{