Fix for code scanning alert: Multiplication result converted to larger type
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1049,13 +1049,13 @@ public:
|
||||
p->GetStateData(ValidStateIndex(p, L, 1));
|
||||
lua_createtable(L, 2, 0);
|
||||
lua_createtable(L, 4, 0);
|
||||
lua_pushnumber(L, state.rect.left * width_ratio);
|
||||
lua_pushnumber(L, static_cast<lua_Number>(state.rect.left) * width_ratio);
|
||||
lua_rawseti(L, -2, 1);
|
||||
lua_pushnumber(L, state.rect.top * height_ratio);
|
||||
lua_pushnumber(L, static_cast<lua_Number>(state.rect.top) * height_ratio);
|
||||
lua_rawseti(L, -2, 2);
|
||||
lua_pushnumber(L, (state.rect.right - width_pix) * width_ratio);
|
||||
lua_pushnumber(L, (static_cast<lua_Number>(state.rect.right) - width_pix) * width_ratio);
|
||||
lua_rawseti(L, -2, 3);
|
||||
lua_pushnumber(L, (state.rect.bottom + height_pix) * height_ratio);
|
||||
lua_pushnumber(L, (static_cast<lua_Number>(state.rect.bottom) + height_pix) * height_ratio);
|
||||
lua_rawseti(L, -2, 4);
|
||||
lua_rawseti(L, -2, 1);
|
||||
lua_pushnumber(L, state.delay);
|
||||
|
||||
Reference in New Issue
Block a user