player/lua: fix UB in integerness check

This commit is contained in:
Kacper Michajłow committed 2025-10-15 21:59:55 +02:00
1 parent 339ad7e49e
commit fdbe06a6bc
1 file changed
+1 -2
+1 -2
View File
@@ -655,8 +655,7 @@ static int script_set_property_bool(lua_State *L)
static bool is_int(double d)
{
int64_t v = d;
return d == (double)v;
return d >= (double)INT64_MIN && d <= (double)INT64_MAX && d == (int64_t)d;
}
static int script_set_property_number(lua_State *L)