From 0aa8dad19930d39fa7abd0ed5a0c75ac2f257153 Mon Sep 17 00:00:00 2001 From: rogerman Date: Thu, 23 Aug 2018 21:50:17 -0700 Subject: [PATCH] WiFi: Fix a bug where AdHoc connections would fail to read the socket on non-Windows systems. --- desmume/src/wifi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desmume/src/wifi.cpp b/desmume/src/wifi.cpp index 95ae87a6a..cee889b1e 100755 --- a/desmume/src/wifi.cpp +++ b/desmume/src/wifi.cpp @@ -1900,7 +1900,7 @@ void AdhocCommInterface::Trigger() tv.tv_sec = 0; tv.tv_usec = 0; - if (select(1, &fd, 0, 0, &tv)) + if (select(thisSocket+1, &fd, NULL, NULL, &tv)) { sockaddr_t fromAddr; socklen_t fromLen = sizeof(sockaddr_t);