diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/javascript.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/player/javascript.c b/player/javascript.c index 95774c4651..a43f38753b 100644 --- a/player/javascript.c +++ b/player/javascript.c @@ -1071,7 +1071,7 @@ static int get_obj_properties(void *ta_ctx, char ***keys, js_State *J, int idx) static bool same_as_int64(double d) { // The range checks also validly filter inf and nan, so behavior is defined - return d >= INT64_MIN && d <= INT64_MAX && d == (int64_t)d; + return d >= INT64_MIN && d <= (double) INT64_MAX && d == (int64_t)d; } static int jsL_checkint(js_State *J, int idx) @@ -1085,7 +1085,7 @@ static int jsL_checkint(js_State *J, int idx) static uint64_t jsL_checkuint64(js_State *J, int idx) { double d = js_tonumber(J, idx); - if (!(d >= 0 && d <= UINT64_MAX)) + if (!(d >= 0 && d <= (double) UINT64_MAX)) js_error(J, "uint64 out of range at index %d", idx); return d; } |