summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-09-24 09:08:01 +0200
committerJo-Philipp Wich <jo@mein.io>2021-09-24 09:08:01 +0200
commit5b908bdf64a586d27d5bdd1df8c72a7cd63b386a (patch)
tree6786a8c277d9d4dd63c0d6877cb87c50e8964677
parente43b751aab997c5e74a0712f7569d90bd3d6b429 (diff)
ubus: properly handle signed 64bit values too
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--lib/ubus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ubus.c b/lib/ubus.c
index a66b011..67bd151 100644
--- a/lib/ubus.c
+++ b/lib/ubus.c
@@ -102,7 +102,7 @@ uc_blob_to_json(uc_vm_t *vm, struct blob_attr *attr, bool table, const char **na
return ucv_int64_new((int32_t)be32_to_cpu(*(uint32_t *)data));
case BLOBMSG_TYPE_INT64:
- return ucv_uint64_new(be64_to_cpu(*(uint64_t *)data));
+ return ucv_int64_new((int64_t)be64_to_cpu(*(uint64_t *)data));
case BLOBMSG_TYPE_DOUBLE:
;