summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2016-06-01 16:47:00 +0200
committerJo-Philipp Wich <jo@mein.io>2016-06-01 16:47:00 +0200
commit7151885df6ac2554c07cc6047dde7c4eb253ce87 (patch)
tree146eae1a40edf75411d8c1f1c49fe6e75265c9f0
parent596f31e7c6e59685d1c04e91ea01b5982c044459 (diff)
downloadjsonpath-7151885df6ac2554c07cc6047dde7c4eb253ce87.tar.gz
cli: properly format 64bit values
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 960b003..bbb2bbd 100644
--- a/main.c
+++ b/main.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <stdbool.h>
+#include <stdint.h>
#include <unistd.h>
#include <errno.h>
@@ -211,7 +212,7 @@ export_value(struct list_head *matches, const char *prefix, const char *sep,
case json_type_int:
print_separator(sep, &sc, sl);
- printf("%d", json_object_get_int(item->jsobj));
+ printf("%" PRId64, json_object_get_int64(item->jsobj));
break;
case json_type_double: