From 21a2e0c787cb3bbbca5dcab9320bd3e3dedbe5ac Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Tue, 25 Feb 2020 06:53:51 +0100 Subject: [PATCH] Fix compilation C90 mixed declarations and code (Thanks Cameron Gutman !) --- 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 015a1359c..3795b94d3 100644 --- a/src/video/SDL_surface.c +++ b/src/video/SDL_surface.c @@ -1052,8 +1052,8 @@ SDL_ConvertSurface(SDL_Surface * surface, const SDL_PixelFormat * format, /* Set opaque and backup palette alpha values */ if (set_opaque) { - palette_saved_alpha = SDL_stack_alloc(Uint8, surface->format->palette->ncolors); int i; + palette_saved_alpha = SDL_stack_alloc(Uint8, surface->format->palette->ncolors); for (i = 0; i < surface->format->palette->ncolors; i++) { palette_saved_alpha[i] = surface->format->palette->colors[i].a; surface->format->palette->colors[i].a = SDL_ALPHA_OPAQUE;