diff --git a/src/RageSurface.cpp b/src/RageSurface.cpp index 9615184c91..6b25dd9c45 100644 --- a/src/RageSurface.cpp +++ b/src/RageSurface.cpp @@ -137,8 +137,8 @@ RageSurface::RageSurface( const RageSurface &cpy ) pixels_owned = true; if( cpy.pixels ) { - pixels = new uint8_t[ pitch*h ]; - memcpy( pixels, cpy.pixels, pitch*h ); + pixels = new uint8_t[ static_cast(pitch) * h ]; + memcpy( pixels, cpy.pixels, static_cast(pitch) * h ); } else pixels = nullptr;