From 90176a1f1cbcfe2ae7aee42802bca697bcb7cceb Mon Sep 17 00:00:00 2001 From: Scott Brenner Date: Sat, 24 May 2025 21:16:24 -0700 Subject: [PATCH] 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> --- src/ActorMultiVertex.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ActorMultiVertex.cpp b/src/ActorMultiVertex.cpp index 3146fecbf9..78b8e0ce33 100644 --- a/src/ActorMultiVertex.cpp +++ b/src/ActorMultiVertex.cpp @@ -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(state.rect.left) * width_ratio); lua_rawseti(L, -2, 1); - lua_pushnumber(L, state.rect.top * height_ratio); + lua_pushnumber(L, static_cast(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(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(state.rect.bottom) + height_pix) * height_ratio); lua_rawseti(L, -2, 4); lua_rawseti(L, -2, 1); lua_pushnumber(L, state.delay);