From eab2d97d071349eec3965ce0131eb8a89616fc6f Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 4 Dec 2023 20:59:43 -0800 Subject: [PATCH] Fixed warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2). --- src/video/SDL_blit_A.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_blit_A.c b/src/video/SDL_blit_A.c index 0e61c8a356..7ee829c5e2 100644 --- a/src/video/SDL_blit_A.c +++ b/src/video/SDL_blit_A.c @@ -345,7 +345,7 @@ static void SDL_TARGETING("mmx") BlitRGBtoRGBPixelAlphaMMX(SDL_BlitInfo *info) } multmask = 0x00FF; - multmask <<= (ashift * 2); + multmask <<= ((Uint64)ashift * 2); multmask2 = 0x00FF00FF00FF00FFULL; while (height--) {