Change JSON integer's underlying type from int to long
[jansson.git] / src / dump.c
index 3f34919..c55d332 100644 (file)
@@ -185,7 +185,7 @@ 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, "%li", json_integer_value(json));
             if(size >= MAX_INTEGER_STR_LENGTH)
                 return -1;