SDL_net: windows: Fix bit-twiddling to determine IPv4 broadcast addresses.

From 4ca9bb8299dd70e109bdaf673c54909da9ff5d15 Mon Sep 17 00:00:00 2001
From: unknown <[EMAIL REDACTED]>
Date: Sun, 17 May 2026 20:42:34 -0400
Subject: [PATCH] windows: Fix bit-twiddling to determine IPv4 broadcast
 addresses.

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

diff --git a/src/SDL_net.c b/src/SDL_net.c
index 1966444..e7ff09b 100644
--- a/src/SDL_net.c
+++ b/src/SDL_net.c
@@ -462,7 +462,7 @@ static void RefreshInterfaces(void)  // WINDOWS VERSION
                     SOCKADDR_IN bcast;
                     SDL_assert(j->Address.iSockaddrLength == sizeof (bcast));
                     SDL_memcpy(&bcast, (const SOCKADDR_IN *) j->Address.lpSockaddr, sizeof (SOCKADDR_IN));
-                    bcast.sin_addr.S_un.S_addr |= htonl(~((1 << (32 - j->OnLinkPrefixLength)) - 1));
+                    bcast.sin_addr.S_un.S_addr |= htonl((1 << (32 - j->OnLinkPrefixLength)) - 1);
                     new_interfaces[count].broadcast = CreateSDLNetAddrFromSockAddr((const struct sockaddr *) &bcast, sizeof (bcast));
                     new_interfaces[count].index = (Uint32) i->IfIndex;
                 }