From 2a42b90b0498d5bc64c28360e948223826c4b506 Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Mon, 10 Feb 2025 03:56:56 +0300
Subject: [PATCH] fix build with old compilers
---
src/sdl2_compat.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/sdl2_compat.c b/src/sdl2_compat.c
index ca9ebaeb..fa570c4a 100644
--- a/src/sdl2_compat.c
+++ b/src/sdl2_compat.c
@@ -5575,7 +5575,8 @@ static void SynchronizeEnvironmentVariables()
/* Sync any changes to the C environment into SDL3's cached copy */
char **fresh_envp = SDL3_GetEnvironmentVariables(fresh_env);
if (fresh_envp) {
- for (int i = 0; fresh_envp[i]; i++) {
+ int i = 0;
+ for (; fresh_envp[i]; ++i) {
char *sep = SDL3_strchr(fresh_envp[i], '=');
*sep = '\0';
SDL3_SetEnvironmentVariable(env, fresh_envp[i], sep + 1, true);