From 3dadbda16c8f421c076fd7cca1668dce2a9ab090 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Sun, 13 Aug 2023 19:05:47 -0400
Subject: [PATCH] SDLNet_WaitForResolution should call SDLNet_GetAddressStatus
after blocking.
This way the error string is set correctly.
---
SDL_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/SDL_net.c b/SDL_net.c
index 44f3016..a77d402 100644
--- a/SDL_net.c
+++ b/SDL_net.c
@@ -353,7 +353,7 @@ int SDLNet_WaitForResolution(SDLNet_Address *addr)
}
SDL_UnlockMutex(resolver_lock);
- return SDL_AtomicGet(&addr->status);
+ return SDLNet_GetAddressStatus(addr); // so we set the error string if necessary.
}
int SDLNet_GetAddressStatus(SDLNet_Address *addr)