diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-02-15 11:20:40 +0100 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-02-15 11:20:40 +0100 |
commit | 52f262d8b31ee231a95f5504939a4c7813272848 (patch) | |
tree | cb9f99b59cc46dc6c144c94ba92e447a88655ede | |
parent | 46e7a69c949039f89e35fec143dfa58547ff6d94 (diff) |
Don't use C99 featuresrhel-7.9
-rw-r--r-- | src/video/SDL_pixels.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video/SDL_pixels.c b/src/video/SDL_pixels.c index 44626b7494..17f1a7199c 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"); |