X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=src%2Fdump.c;h=42eb256073a73b4eee20504d6e49ca3cc0bf0de7;hb=b76c69de1b26b589551879d80ae582a5a3506cc0;hp=3f34919634e186d56d378c94d63a1806b0f41c56;hpb=68f2861e92e08eb5e2af51c026981bc1e990e1eb;p=jansson.git diff --git a/src/dump.c b/src/dump.c index 3f34919..42eb256 100644 --- a/src/dump.c +++ b/src/dump.c @@ -41,8 +41,8 @@ static int dump_to_file(const char *buffer, int size, void *data) return 0; } -/* 256 spaces (the maximum indentation size) */ -static char whitespace[] = " "; +/* 32 spaces (the maximum indentation size) */ +static char whitespace[] = " "; static int dump_indent(size_t flags, int depth, int space, dump_func dump, void *data) { @@ -185,7 +185,9 @@ static int do_dump(const json_t *json, size_t flags, int depth, char buffer[MAX_INTEGER_STR_LENGTH]; int size; - size = snprintf(buffer, MAX_INTEGER_STR_LENGTH, "%d", json_integer_value(json)); + size = snprintf(buffer, MAX_INTEGER_STR_LENGTH, + "%" JSON_INTEGER_FORMAT, + json_integer_value(json)); if(size >= MAX_INTEGER_STR_LENGTH) return -1;