Просмотр исходного кода

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).

Sam Lantinga 2 лет назад
Родитель
Сommit
eab2d97d07
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/video/SDL_blit_A.c

+ 1 - 1
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--) {