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>
This commit is contained in:
Scott Brenner
2025-04-26 16:23:42 -07:00
committed by teejusb
co-authored by Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
parent 04c58309b7
commit c7d9938ec3
+1 -1
View File
@@ -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<size_t>(x) * color_length, color_length );
std::map<RString, int>::const_iterator it;
it = name_to_color.find( color_name );
if( it == name_to_color.end() )