diff --git a/src/RageSurfaceUtils.cpp b/src/RageSurfaceUtils.cpp index af0c0570af..c677acdcb1 100644 --- a/src/RageSurfaceUtils.cpp +++ b/src/RageSurfaceUtils.cpp @@ -767,7 +767,7 @@ bool RageSurfaceUtils::SaveSurface( const RageSurface *img, RString file ) f.Write( img->format->palette->colors, img->format->palette->ncolors * sizeof(RageSurfaceColor) ); } - f.Write( img->pixels, img->h * img->pitch ); + f.Write( img->pixels, static_cast(img->h) * img->pitch ); return true; } @@ -808,7 +808,7 @@ RageSurface *RageSurfaceUtils::LoadSurface( RString file ) return nullptr; } - if( f.Read( img->pixels, h.height * h.pitch ) != h.height * h.pitch ) + if( f.Read( img->pixels, static_cast(h.height) * h.pitch ) != static_cast(h.height) * h.pitch ) { delete img; return nullptr;