summaryrefslogtreecommitdiffstats
path: root/player/javascript.c
diff options
context:
space:
mode:
authorThomas Weißschuh <thomas@t-8ch.de>2023-02-25 04:54:26 +0000
committersfan5 <sfan5@live.de>2023-02-26 16:45:07 +0100
commited5426c351d9c5b1c605cef82b78d2af625f5d7c (patch)
tree60cc4bf7369f4a3a8ead691b38c413a789c8a77e /player/javascript.c
parent8d67e891ab3a312a9eede0fb5909019a39727eb6 (diff)
downloadmpv-ed5426c351d9c5b1c605cef82b78d2af625f5d7c.tar.bz2
mpv-ed5426c351d9c5b1c605cef82b78d2af625f5d7c.tar.xz
various: fix warning -Wimplicit-const-int-float-conversion
Diffstat (limited to 'player/javascript.c')
-rw-r--r--player/javascript.c4
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;
}