player/lua: fix UB in integerness check
This commit is contained in:
1 parent
339ad7e49e
commit
fdbe06a6bc
1 file changed
+1
-2
+1
-2
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user