From 57d54a0c8915118394484e1a63882877b3125811 Mon Sep 17 00:00:00 2001 From: Scott Brenner Date: Sat, 24 May 2025 21:11:31 -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/RageSurface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/RageSurface.cpp b/src/RageSurface.cpp index 9615184c91..6b25dd9c45 100644 --- a/src/RageSurface.cpp +++ b/src/RageSurface.cpp @@ -137,8 +137,8 @@ RageSurface::RageSurface( const RageSurface &cpy ) pixels_owned = true; if( cpy.pixels ) { - pixels = new uint8_t[ pitch*h ]; - memcpy( pixels, cpy.pixels, pitch*h ); + pixels = new uint8_t[ static_cast(pitch) * h ]; + memcpy( pixels, cpy.pixels, static_cast(pitch) * h ); } else pixels = nullptr;