From dec7875a6e23212021e4d9080330a42832dfe02a Mon Sep 17 00:00:00 2001
From: Edward Rudd <urkle@outoforder.cc>
Date: Tue, 15 Jun 2021 01:40:19 +0000
Subject: [PATCH] update SDL soruce to 2.0.14
---
source/src/video/SDL_blit_N.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/source/src/video/SDL_blit_N.c b/source/src/video/SDL_blit_N.c
index 39c08f6..5199abe 100644
--- a/source/src/video/SDL_blit_N.c
+++ b/source/src/video/SDL_blit_N.c
@@ -27,7 +27,6 @@
#include "SDL_cpuinfo.h"
#include "SDL_blit.h"
-#include "SDL_assert.h"
/* General optimized routines that write char by char */
#define HAVE_FAST_WRITE_INT8 1
@@ -2183,7 +2182,7 @@
if (dstfmt->Amask) {
/* RGB->RGBA, SET_ALPHA */
- Uint32 mask = (info->a >> dstfmt->Aloss) << dstfmt->Ashift;
+ Uint32 mask = ((Uint32)info->a >> dstfmt->Aloss) << dstfmt->Ashift;
while (height--) {
/* *INDENT-OFF* */
@@ -2632,7 +2631,7 @@
if (dstfmt->Amask) {
/* RGB->RGBA, SET_ALPHA */
- Uint32 mask = info->a << dstfmt->Ashift;
+ Uint32 mask = ((Uint32)info->a) << dstfmt->Ashift;
while (height--) {
/* *INDENT-OFF* */
DUFFS_LOOP(
@@ -3059,7 +3058,7 @@
if (dstfmt->Amask) {
/* SET_ALPHA */
- Uint32 mask = info->a << dstfmt->Ashift;
+ Uint32 mask = ((Uint32)info->a) << dstfmt->Ashift;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
int i0 = 0, i1 = 1, i2 = 2;
#else
@@ -3148,7 +3147,7 @@
Uint8 s0 = src[i0];
Uint8 s1 = src[i1];
Uint8 s2 = src[i2];
- Uint32 alphashift = src[i3] << dstfmt->Ashift;
+ Uint32 alphashift = ((Uint32)src[i3]) << dstfmt->Ashift;
/* inversed, compared to Blit_3or4_to_3or4__same_rgb */
*dst32 = (s0 << 16) | (s1 << 8) | (s2) | alphashift;
dst += 4;
@@ -3160,7 +3159,7 @@
}
} else {
/* SET_ALPHA */
- Uint32 mask = info->a << dstfmt->Ashift;
+ Uint32 mask = ((Uint32)info->a) << dstfmt->Ashift;
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
int i0 = 0, i1 = 1, i2 = 2;
#else
--
Gitblit v1.9.3