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:
committed by
teejusb
co-authored by
Copilot Autofix powered by AI
parent
f4da59e7e3
commit
72b3590097
@@ -493,7 +493,7 @@ static bool blit_same_type( const RageSurface *src_surf, const RageSurface *dst_
|
|||||||
// If possible, memcpy the whole thing.
|
// If possible, memcpy the whole thing.
|
||||||
if( src_surf->w == width && dst_surf->w == width && src_surf->pitch == dst_surf->pitch )
|
if( src_surf->w == width && dst_surf->w == width && src_surf->pitch == dst_surf->pitch )
|
||||||
{
|
{
|
||||||
memcpy( dst, src, height*src_surf->pitch );
|
memcpy( dst, src, static_cast<size_t>(height) * src_surf->pitch );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user