SDL: unix: Fix infinite looping in SDL_FriBidi_Process if len > 127

From 0ffb0bdd87499af6472a20c80728467d11c5826f Mon Sep 17 00:00:00 2001
From: John Schoenick <[EMAIL REDACTED]>
Date: Fri, 15 May 2026 15:29:16 -0700
Subject: [PATCH] unix: Fix infinite looping in SDL_FriBidi_Process if len >
 127

start/end should be FriBidiStrIndex here -- using FriBidiLevel makes
them `signed char` and the loop here will become infinite if `end` is
> 127.
---
 src/core/unix/SDL_fribidi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/unix/SDL_fribidi.c b/src/core/unix/SDL_fribidi.c
index 4a55133023870..4599c974dd111 100644
--- a/src/core/unix/SDL_fribidi.c
+++ b/src/core/unix/SDL_fribidi.c
@@ -84,8 +84,8 @@ char *SDL_FriBidi_Process(SDL_FriBidi *fribidi, char *utf8, ssize_t utf8_len, bo
     char *result;
     FriBidiStrIndex len;
     FriBidiLevel max_level;
-    FriBidiLevel start;
-    FriBidiLevel end;
+    FriBidiStrIndex start;
+    FriBidiStrIndex end;
     FriBidiParType direction;
     FriBidiParType str_direction;
     unsigned int i;