mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 06:55:48 +00:00
Bsd: Fix NullReferenceException in BsdSockAddr.FromIPEndPoint() (#3652)
* Bsd: Fix NullReferenceException in BsdSockAddr.FromIPEndPoint() Allows "Victor Vran Overkill Edition" to boot with guest internet access enabled. Thanks to EmulationFanatic for testing this for me! * Bsd: Return proper error code if RemoteEndPoint is null * Remove whitespace from empty line Co-authored-by: gdkchan <gab.dark.100@gmail.com> Co-authored-by: gdkchan <gab.dark.100@gmail.com>
This commit is contained in:
parent
38275f9056
commit
5ff5fe47ba
1 changed files with 10 additions and 6 deletions
|
@ -573,8 +573,11 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||||
|
|
||||||
LinuxError errno = LinuxError.EBADF;
|
LinuxError errno = LinuxError.EBADF;
|
||||||
ISocket socket = _context.RetrieveSocket(socketFd);
|
ISocket socket = _context.RetrieveSocket(socketFd);
|
||||||
|
|
||||||
if (socket != null)
|
if (socket != null)
|
||||||
|
{
|
||||||
|
errno = LinuxError.ENOTCONN;
|
||||||
|
|
||||||
|
if (socket.RemoteEndPoint != null)
|
||||||
{
|
{
|
||||||
errno = LinuxError.SUCCESS;
|
errno = LinuxError.SUCCESS;
|
||||||
|
|
||||||
|
@ -582,6 +585,7 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||||
WriteBsdResult(context, 0, errno);
|
WriteBsdResult(context, 0, errno);
|
||||||
context.ResponseData.Write(Unsafe.SizeOf<BsdSockAddr>());
|
context.ResponseData.Write(Unsafe.SizeOf<BsdSockAddr>());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return WriteBsdResult(context, 0, errno);
|
return WriteBsdResult(context, 0, errno);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue