SDL: Use srcpixel now that we've set it

From 3489a45216a78d5909d1bb34b8c334a6a713f930 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 7 Nov 2025 11:12:10 -0800
Subject: [PATCH] Use srcpixel now that we've set it

---
 src/render/software/SDL_triangle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/render/software/SDL_triangle.c b/src/render/software/SDL_triangle.c
index 65c8831bd742c..880d8137dc90d 100644
--- a/src/render/software/SDL_triangle.c
+++ b/src/render/software/SDL_triangle.c
@@ -803,7 +803,7 @@ static void SDL_BlitTriangle_Slow(SDL_BlitInfo *info,
         src = (info->src + (srcy * info->src_pitch) + (srcx * srcbpp));
         if (FORMAT_INDEXED(srcfmt_val)) {
             srcpixel = *src;
-            const SDL_Color *color = &palette->colors[*src];
+            const SDL_Color *color = &palette->colors[srcpixel];
             srcR = color->r;
             srcG = color->g;
             srcB = color->b;