Merge pull request #14290 from ANR2ME/adhoc

Fix FlatOut Head On multiplayer.
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2021-03-13 22:14:19 +01:00
commit 23b062c34b
1 file changed
+2 -2
+2 -2
View File
@@ -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;
@@ -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