Merge pull request #61 from liquanqing/master

fix warning in cJSON
pull/73/head
朱天龙 (Armink) 7 years ago committed by GitHub
commit 6d1797c7a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -276,7 +276,7 @@ static char *print_string_ptr(const char *str,printbuffer *p)
strcpy(out,"\"\""); strcpy(out,"\"\"");
return out; return out;
} }
ptr=str;while ((token=*ptr) && ++len) {if (strchr("\"\\\b\f\n\r\t",token)) len++; else if (token<32) len+=5;ptr++;} ptr=str;while (('\0' != (token=*ptr)) && ++len) {if (NULL != strchr("\"\\\b\f\n\r\t",token)) len++; else if (token<32) len+=5;ptr++;}
if (p) out=ensure(p,len+3); if (p) out=ensure(p,len+3);
else out=(char*)cJSON_malloc(len+3); else out=(char*)cJSON_malloc(len+3);

Loading…
Cancel
Save