Fixed undefined behavior in QueueCmdSetDrawColor()

Fixes https://github.com/libsdl-org/SDL/issues/4995
Patch from Andrew Kelley
main
Ozkan Sezer 2021-11-23 08:01:02 +03:00
parent c878d9a0aa
commit e18be04bc6
1 changed files with 1 additions and 1 deletions

View File

@ -394,7 +394,7 @@ QueueCmdSetClipRect(SDL_Renderer *renderer)
static int
QueueCmdSetDrawColor(SDL_Renderer *renderer, SDL_Color *col)
{
const Uint32 color = ((col->a << 24) | (col->r << 16) | (col->g << 8) | col->b);
const Uint32 color = (((Uint32)col->a << 24) | (col->r << 16) | (col->g << 8) | col->b);
int retval = 0;
if (!renderer->color_queued || (color != renderer->last_queued_color)) {