luci-lib-jsonc: stringify int use json_object_new_int64 instead 5730/head
authorJustin Klaassen <jck112@users.noreply.github.com>
Sat, 19 Mar 2022 18:34:05 +0000 (11:34 -0700)
committerJustin Klaassen <jck112@users.noreply.github.com>
Sun, 20 Mar 2022 15:11:33 +0000 (08:11 -0700)
Fixes: #3293
Signed-off-by: Justin Klaassen <jck112@users.noreply.github.com>
libs/luci-lib-jsonc/src/jsonc.c

index 2f56a4a68815e1e9f39fc7140736edb1fa526fe4..74839dd4f57cadab356ade396d0645e6bf9ebccb 100644 (file)
@@ -368,7 +368,7 @@ static struct json_object * _lua_to_json_rec(lua_State *L, int index,
                ni = lua_tointeger(L, index);
 
                if (nd == ni)
-                       return json_object_new_int(nd);
+                       return json_object_new_int64(nd);
 
                return json_object_new_double(nd);