From c7d9938ec3eac5b8d77c7e593af29a11bc36cd7e Mon Sep 17 00:00:00 2001 From: Scott Brenner Date: Sat, 26 Apr 2025 15:36:52 -0700 Subject: [PATCH] Potential fix for code scanning alert no. 60: 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_Load_XPM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RageSurface_Load_XPM.cpp b/src/RageSurface_Load_XPM.cpp index 7b12aead04..03f36c3b0b 100644 --- a/src/RageSurface_Load_XPM.cpp +++ b/src/RageSurface_Load_XPM.cpp @@ -96,7 +96,7 @@ RageSurface *RageSurface_Load_XPM( char * const *xpm, RString &error ) int32_t *p32 = (int32_t *) p; for( int x = 0; x < width; ++x ) { - RString color_name = row.substr( x*color_length, color_length ); + RString color_name = row.substr( static_cast(x) * color_length, color_length ); std::map::const_iterator it; it = name_to_color.find( color_name ); if( it == name_to_color.end() )