Skip to content

Commit 63c9a78

Browse files
author
James McLaughlin
committed
Merge pull request json-parser#33 from holyhead/patch-1
Fix order of calloc call
2 parents 9d2a543 + 3f26899 commit 63c9a78

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ typedef struct
7878

7979
static void * default_alloc (size_t size, int zero, void * user_data)
8080
{
81-
return zero ? calloc (size, 1) : malloc (size);
81+
return zero ? calloc (1, size) : malloc (size);
8282
}
8383

8484
static void default_free (void * ptr, void * user_data)

0 commit comments

Comments
 (0)