Potential fix for code scanning alert no. 61: 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
e5bb567b0b
commit
607b407007
@@ -54,7 +54,7 @@ MovieTexture_Null::MovieTexture_Null(RageTextureID ID) : RageMovieTexture(ID)
|
|||||||
const RageDisplay::RagePixelFormatDesc *pfd = DISPLAY->GetPixelFormatDesc( pixfmt );
|
const RageDisplay::RagePixelFormatDesc *pfd = DISPLAY->GetPixelFormatDesc( pixfmt );
|
||||||
RageSurface *img = CreateSurface( size, size, pfd->bpp,
|
RageSurface *img = CreateSurface( size, size, pfd->bpp,
|
||||||
pfd->masks[0], pfd->masks[1], pfd->masks[2], pfd->masks[3] );
|
pfd->masks[0], pfd->masks[1], pfd->masks[2], pfd->masks[3] );
|
||||||
memset( img->pixels, 0, img->pitch*img->h );
|
memset( img->pixels, 0, static_cast<size_t>(img->pitch) * img->h );
|
||||||
|
|
||||||
texHandle = DISPLAY->CreateTexture( pixfmt, img, false );
|
texHandle = DISPLAY->CreateTexture( pixfmt, img, false );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user