Blob Blame History Raw
From 52f262d8b31ee231a95f5504939a4c7813272848 Mon Sep 17 00:00:00 2001
From: Wim Taymans <wtaymans@redhat.com>
Date: Sat, 15 Feb 2020 11:20:40 +0100
Subject: [PATCH] Don't use C99 features

---
 src/video/SDL_pixels.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c
index 44626b749..17f1a7199 100644
--- a/src/video/SDL_pixels.c
+++ b/src/video/SDL_pixels.c
@@ -292,10 +292,11 @@ void SDL_DitherColors(SDL_Color *colors, int bpp)
 Uint16 SDL_CalculatePitch(SDL_Surface *surface)
 {
 	unsigned int pitch = 0;
+	Uint8 byte;
 
 	/* Surface should be 4-byte aligned for speed */
 	/* The code tries to prevent from an Uint16 overflow. */;
-	for (Uint8 byte = surface->format->BytesPerPixel; byte; byte--) {
+	for (byte = surface->format->BytesPerPixel; byte; byte--) {
 		pitch += (unsigned int)surface->w;
 		if (pitch < surface->w) {
 			SDL_SetError("A scanline is too wide");
-- 
2.24.1