SDL: stdlib: Fix copy/paste error in StepUTF8().

From 57f22e6e43ad7c40912645d6cc76083107b4c367 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Thu, 8 Oct 2026 11:10:08 -0400
Subject: [PATCH] stdlib: Fix copy/paste error in StepUTF8().

Fixes #16464.
---
 src/stdlib/SDL_string.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c
index c0525ef928005..a8a36e9cd99a5 100644
--- a/src/stdlib/SDL_string.c
+++ b/src/stdlib/SDL_string.c
@@ -240,7 +240,7 @@ static Uint32 StepUTF8(const char **_str, const size_t slen)
         const Uint8 str2 = str[2];
         const Uint8 str3 = str[3];
         if (((str1 & 0xC0) == 0x80) && ((str2 & 0xC0) == 0x80) && ((str3 & 0xC0) == 0x80)) {  // If trailing bytes aren't 10xxxxxx, sequence is bogus.
-            const Uint32 octet2 = ((Uint32) (str1 & 0x1F)) << 12;
+            const Uint32 octet2 = ((Uint32) (str1 & 0x3F)) << 12;
             const Uint32 octet3 = ((Uint32) (str2 & 0x3F)) << 6;
             const Uint32 octet4 = ((Uint32) (str3 & 0x3F));
             const Uint32 result = ((octet & 0x07) << 18) | octet2 | octet3 | octet4;