mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-22 09:53:35 +01:00
Fix NRE when calling GetSockName before Bind (#6206)
This commit is contained in:
parent
f6475cca17
commit
30bdc4544e
1 changed files with 8 additions and 1 deletions
|
@ -121,8 +121,15 @@ namespace Ryujinx.HLE.HOS.Services.Sockets.Bsd
|
||||||
{
|
{
|
||||||
IPEndPoint endPoint = isRemote ? socket.RemoteEndPoint : socket.LocalEndPoint;
|
IPEndPoint endPoint = isRemote ? socket.RemoteEndPoint : socket.LocalEndPoint;
|
||||||
|
|
||||||
|
if (endPoint != null)
|
||||||
|
{
|
||||||
context.Memory.Write(bufferPosition, BsdSockAddr.FromIPEndPoint(endPoint));
|
context.Memory.Write(bufferPosition, BsdSockAddr.FromIPEndPoint(endPoint));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
context.Memory.Write(bufferPosition, new BsdSockAddr());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[CommandCmif(0)]
|
[CommandCmif(0)]
|
||||||
// Initialize(nn::socket::BsdBufferConfig config, u64 pid, u64 transferMemorySize, KObject<copy, transfer_memory>, pid) -> u32 bsd_errno
|
// Initialize(nn::socket::BsdBufferConfig config, u64 pid, u64 transferMemorySize, KObject<copy, transfer_memory>, pid) -> u32 bsd_errno
|
||||||
|
|
Loading…
Reference in a new issue