summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--eval.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eval.c b/eval.c
index 5bf44ef..68b2780 100644
--- a/eval.c
+++ b/eval.c
@@ -378,7 +378,7 @@ ut_getval(struct json_object *scope, struct json_object *key)
if (json_object_is_type(key, json_type_double)) {
d = json_object_get_double(key);
- if (ceil(d) != d)
+ if ((double)(int64_t)(d) != d)
return NULL;
idx = (int64_t)d;