From ed5426c351d9c5b1c605cef82b78d2af625f5d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= Date: Sat, 25 Feb 2023 04:54:26 +0000 Subject: various: fix warning -Wimplicit-const-int-float-conversion --- player/javascript.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'player/javascript.c') 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; } -- cgit v1.2.3