From 726d8de16cd430e983748df89b937f91d6ddbfc3 Mon Sep 17 00:00:00 2001 From: Sepalani Date: Wed, 31 May 2017 23:16:43 +0100 Subject: [PATCH] IP/Top: Fix GetAddrInfo written socket --- Source/Core/Core/IOS/Network/IP/Top.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/Core/Core/IOS/Network/IP/Top.cpp b/Source/Core/Core/IOS/Network/IP/Top.cpp index fc555f4340..90cc6db163 100644 --- a/Source/Core/Core/IOS/Network/IP/Top.cpp +++ b/Source/Core/Core/IOS/Network/IP/Top.cpp @@ -919,9 +919,8 @@ IPCCommandResult NetIPTop::HandleGetAddressInfoRequest(const IOCtlVRequest& requ if (result_iter->ai_addr) { Memory::Write_U32(sockoffset, addr + 0x18); - Memory::Write_U16(((result_iter->ai_addr->sa_family & 0xFF) << 8) | - (result_iter->ai_addrlen & 0xFF), - sockoffset); + Memory::Write_U8(result_iter->ai_addr->sa_family & 0xFF, sockoffset); + Memory::Write_U8(result_iter->ai_addrlen & 0xFF, sockoffset + 0x01); Memory::CopyToEmu(sockoffset + 0x2, result_iter->ai_addr->sa_data, sizeof(result_iter->ai_addr->sa_data)); sockoffset += 0x1C;