cJSON

mirror of Dave's cJSON
git clone git://git.thc420.xyz/cJSON
Log | Files | Refs | README | LICENSE

commit 0fd1435f4b9bbca92747b4b2ccc0b38823f1a0ff
parent 2ffefcec733cbf2f7b31fa312a6f975a50e79e1f
Author: Kevin Branigan <kbranigan@gmail.com>
Date:   Fri, 12 Jun 2015 14:25:52 -0400

Merge pull request #6 from DongwenHuang/master

Update test.c

Diffstat:
Mtest.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/test.c b/test.c @@ -44,7 +44,7 @@ void doit(char *text) void dofile(char *filename) { FILE *f=fopen(filename,"rb");fseek(f,0,SEEK_END);long len=ftell(f);fseek(f,0,SEEK_SET); - char *data=(char*)malloc(len+1);fread(data,1,len,f);fclose(f); + char *data=(char*)malloc(len+1);fread(data,1,len,f);data[len]='\0';fclose(f); doit(data); free(data); }