From 19a65a46a6cd41027326590c33ce4a9d8173bf65 Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Sat, 17 Oct 2020 21:47:05 +0200 Subject: [PATCH] Fixed bug 5321 - crash in SDL_ConvertSurface with RLE surfaces keep RLE information in flags when converting the surface --- src/video/SDL_surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_surface.c b/src/video/SDL_surface.c index 3d505cc0f..d6409e8fc 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -1026,7 +1026,7 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, surface->map->info.g = 0xFF; surface->map->info.b = 0xFF; surface->map->info.a = 0xFF; - surface->map->info.flags = 0; + surface->map->info.flags = (copy_flags & (SDL_COPY_RLE_COLORKEY | SDL_COPY_RLE_ALPHAKEY)); SDL_InvalidateMap(surface->map); /* Copy over the image data */