SDL_net: RefreshInterfaces: Fix iface pointer skipping ahead when loop continues early.

From 38937c1205695e97e7726dc2c5ed5c4d7e13c00e Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Mon, 25 May 2026 01:35:18 -0400
Subject: [PATCH] RefreshInterfaces: Fix iface pointer skipping ahead when loop
 continues early.

---
 src/SDL_net.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/SDL_net.c b/src/SDL_net.c
index ac0d2ab..38a4f83 100644
--- a/src/SDL_net.c
+++ b/src/SDL_net.c
@@ -728,7 +728,7 @@ static void RefreshInterfaces(void)  // LINUX/BSD VERSION
     }
 
     NetworkInterface *iface = &new_interfaces[0];
-    for (struct ifaddrs *i = ifaddr; i != NULL; i = i->ifa_next, iface++) {
+    for (struct ifaddrs *i = ifaddr; i != NULL; i = i->ifa_next) {
         if (!i->ifa_name || !i->ifa_addr) {
             continue;  // i guess.
         }
@@ -743,7 +743,6 @@ static void RefreshInterfaces(void)  // LINUX/BSD VERSION
             iface->address = CreateSDLNetAddrFromSockAddr(i->ifa_addr, sizeof (struct sockaddr_in6));
         } else {
             new_num_interfaces--;
-            iface--;
             continue;
         }
 
@@ -762,6 +761,8 @@ static void RefreshInterfaces(void)  // LINUX/BSD VERSION
             NET_UnrefAddress(iface->broadcast);  // just in case.
             goto failed;
         }
+
+        iface++;
     }
 
 succeeded: