Skip to content

Commit

Permalink
Merge pull request #14290 from ANR2ME/adhoc
Browse files Browse the repository at this point in the history
Fix FlatOut Head On multiplayer.
  • Loading branch information
hrydgard authored Mar 13, 2021
2 parents 542e426 + b730955 commit 23b062c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/HLE/sceNetAdhoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1629,7 +1629,7 @@ static int sceNetAdhocPdpRecv(int id, void *addr, void * port, void *buf, void *
socket->nonblocking = flag;

// Valid Arguments
if (saddr != NULL && port != NULL && buf != NULL && len != NULL && *len > 0) {
if (saddr != NULL && port != NULL && buf != NULL && len != NULL) {
#ifndef PDP_DIRTY_MAGIC
// Schedule Timeout Removal
//if (flag == 1) timeout = 0;
Expand Down Expand Up @@ -1686,7 +1686,7 @@ static int sceNetAdhocPdpRecv(int id, void *addr, void * port, void *buf, void *
memcpy(buf, dummyPeekBuf64k, std::min(received, *len));

if (received != SOCKET_ERROR && *len < received) {
WARN_LOG(SCENET, "sceNetAdhocPdpRecv[%i:%u]: Peeked %u/%u bytes from %s:%u\n", id, getLocalPort(pdpsocket.id), received, *len, ip2str(sin.sin_addr).c_str(), ntohs(sin.sin_port));
INFO_LOG(SCENET, "sceNetAdhocPdpRecv[%i:%u]: Peeked %u/%u bytes from %s:%u\n", id, getLocalPort(pdpsocket.id), received, *len, ip2str(sin.sin_addr).c_str(), ntohs(sin.sin_port));
*len = received;

// Peer MAC
Expand Down

0 comments on commit 23b062c

Please sign in to comment.