Skip to content

Commit

Permalink
Fixed bug 5321 - crash in SDL_ConvertSurface with RLE surfaces
Browse files Browse the repository at this point in the history
keep RLE information in flags when converting the surface
  • Loading branch information
1bsyl committed Oct 17, 2020
1 parent c70191d commit 19a65a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/SDL_surface.c
Expand Up @@ -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 */
Expand Down

0 comments on commit 19a65a4

Please sign in to comment.