SDL_image: Fix stride issue with PCX decoding

From e8eef94d83be2ca59204faccc0cac109f4e59c2a Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Wed, 25 May 2022 09:28:06 -0700
Subject: [PATCH] Fix stride issue with PCX decoding

Fixes https://github.com/libsdl-org/SDL_image/issues/266
---
 IMG_pcx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/IMG_pcx.c b/IMG_pcx.c
index d3361e03..09b9a997 100644
--- a/IMG_pcx.c
+++ b/IMG_pcx.c
@@ -231,9 +231,10 @@ SDL_Surface *IMG_LoadPCX_RW(SDL_RWops *src)
                         error = "decoding out of bounds (corrupt?)";
                         goto done;
                     }
-                    *dst = *innerSrc++;
+                    *dst = innerSrc[x];
                     dst += pcxh.NPlanes;
                 }
+                innerSrc += pcxh.BytesPerLine;
             }
         }