aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2022-07-11 23:50:01 +0100
committerGitHub <noreply@github.com>2022-07-12 00:50:01 +0200
commitb7fb474bfec178c28e37e8ccb3744a2e8a706407 (patch)
tree60f75e5d6d44960af5d23371a3e4580300aa8da6
parent2fa6413ed80931d63dee582943dce8a6d8f86974 (diff)
Handle the case where byte optionValues are sent to BSD (#3405)1.1.177
Some games and the Mario Odyssey Multiplayer mod do this. The SMO multiplayer mod also needs you to revert #3394 as it uses a blocking socket to receive (otherwise it hangs), and it doesn't seem to like being forced as non-blocking.
-rw-r--r--Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs
index 349dbde0..43172ab4 100644
--- a/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs
+++ b/Ryujinx.HLE/HOS/Services/Sockets/Bsd/Impl/ManagedSocket.cs
@@ -304,7 +304,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
return LinuxError.EOPNOTSUPP;
}
- int value = MemoryMarshal.Read<int>(optionValue);
+ int value = optionValue.Length >= 4 ? MemoryMarshal.Read<int>(optionValue) : MemoryMarshal.Read<byte>(optionValue);
if (option == BsdSocketOption.SoLinger)
{