Skip to content

Commit

Permalink
Fix accept() bug, which was using the wrong isRW for error conversion.
Browse files Browse the repository at this point in the history
Also fixed a debug issue where local_name is used uninitialised.
  • Loading branch information
Parlane committed Oct 9, 2013
1 parent a317391 commit f811dbb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/Core/Src/IPC_HLE/WII_Socket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f811dbb

Please sign in to comment.