fix soc service - RecvFrom crash on Citra but not on 3DS

This commit is contained in:
Nguyen Dac Nam 2018-08-21 12:59:02 +07:00 committed by GitHub
parent 7279335fc0
commit fc8c199895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -587,6 +587,8 @@ void SOC_U::RecvFrom(Kernel::HLERequestContext& ctx) {
if (ret >= 0 && src_addr_len > 0) { if (ret >= 0 && src_addr_len > 0) {
ctr_src_addr = CTRSockAddr::FromPlatform(src_addr); ctr_src_addr = CTRSockAddr::FromPlatform(src_addr);
std::memcpy(addr_buff.data(), &ctr_src_addr, sizeof(ctr_src_addr)); std::memcpy(addr_buff.data(), &ctr_src_addr, sizeof(ctr_src_addr));
}else {
addr_buff.resize(0);
} }
s32 total_received = ret; s32 total_received = ret;