Fix accept() bug, which was using the wrong isRW for error conversion.
Also fixed a debug issue where local_name is used uninitialised.
This commit is contained in:
parent
a317391e3d
commit
f811dbb575
|
@ -236,7 +236,7 @@ void WiiSocket::update(bool read, bool write, bool except)
|
|||
|
||||
socklen_t addrlen = sizeof(sockaddr_in);
|
||||
int ret = (s32)accept(fd, (sockaddr*)&local_name, &addrlen);
|
||||
ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", false);
|
||||
ReturnValue = WiiSockMan::getNetErrorCode(ret, "SO_ACCEPT", true);
|
||||
|
||||
WiiSockMan::Convert(local_name, *wii_name, addrlen);
|
||||
}
|
||||
|
@ -433,6 +433,7 @@ void WiiSocket::update(bool read, bool write, bool except)
|
|||
flags &= SO_MSG_OOB;
|
||||
|
||||
sockaddr_in local_name;
|
||||
memset(&local_name, 0, sizeof(sockaddr_in));
|
||||
if (has_destaddr)
|
||||
{
|
||||
WiiSockAddrIn* wii_name = (WiiSockAddrIn*)Memory::GetPointer(BufferIn2 + 0x0C);
|
||||
|
|
Loading…
Reference in New Issue