Handle the case where byte optionValues are sent to BSD ()

Some games and the Mario Odyssey Multiplayer mod do this.

The SMO multiplayer mod also needs you to revert  as it uses a blocking socket to receive (otherwise it hangs), and it doesn't seem to like being forced as non-blocking.
This commit is contained in:
riperiperi 2022-07-11 23:50:01 +01:00 committed by GitHub
parent 2fa6413ed8
commit b7fb474bfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
{