SDL_image: pcx: fix declaration of ‘ch’ shadows a previous local

From a929168916ca3ead0bce56feea61c4ebe438038b Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Thu, 25 Jan 2024 19:52:57 +0100
Subject: [PATCH] =?UTF-8?q?pcx:=20fix=20declaration=20of=20=E2=80=98ch?=
 =?UTF-8?q?=E2=80=99=20shadows=20a=20previous=20local?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/IMG_pcx.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/IMG_pcx.c b/src/IMG_pcx.c
index aa252b3b..11c1cf41 100644
--- a/src/IMG_pcx.c
+++ b/src/IMG_pcx.c
@@ -167,6 +167,7 @@ SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src)
             }
         } else {
             for ( i = 0; i < bpl; i++ ) {
+
                 if ( !count ) {
                     if ( SDL_RWread(src, &ch, 1) != 1 ) {
                         error = "file truncated";
@@ -238,17 +239,17 @@ SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src)
 
         surface->format->palette->ncolors = nc;
         if ( src_bits == 8 ) {
-            Uint8 ch;
+            Uint8 pch;
             Uint8 colormap[768];
 
             /* look for a 256-colour palette */
             do {
-                if ( SDL_RWread(src, &ch, 1) != 1 ) {
+                if ( SDL_RWread(src, &pch, 1) != 1 ) {
                     /* Couldn't find the palette, try the end of the file */
                     SDL_RWseek(src, -768, SDL_RW_SEEK_END);
                     break;
                 }
-            } while ( ch != 12 );
+            } while ( pch != 12 );
 
             if ( SDL_RWread(src, colormap, sizeof(colormap)) != sizeof(colormap) ) {
                 error = "file truncated";