From ae906cb292e2541af80c7e6ed8a2f69c94ca4035 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 28 Oct 2026 15:48:39 +0100 Subject: [PATCH] sceNetAdhocMatching: Don't list a member twice A child the host accepts right after another one learns about that one twice: from the sibling list in its accept packet, and from the BIRTH packet the host sends about it. It added it both times, so with three or four players the last one to join had an extra member (pspautotests net/adhoc/group/matching, not recorded on PSPs yet). Co-Authored-By: Claude Opus 5.5 --- Core/HLE/sceNetAdhocMatching.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Core/HLE/sceNetAdhocMatching.cpp b/Core/HLE/sceNetAdhocMatching.cpp index 8bfab8140a..f926b76496 100644 --- a/Core/HLE/sceNetAdhocMatching.cpp +++ b/Core/HLE/sceNetAdhocMatching.cpp @@ -1024,6 +1024,11 @@ void actOnBirthPacket(SceNetAdhocMatchingContext * context, SceNetEtherAddr * se SceNetEtherAddr mac; memcpy(&mac, context->rxbuf + 1, sizeof(SceNetEtherAddr)); + // A child accepted just after another already has it from its accept packet's sibling list. + if (findPeer(context, &mac) != NULL || isMacMatch(&mac, &context->mac)) { + return; + } + // Allocate Memory SceNetAdhocMatchingMemberInternal * sibling = (SceNetAdhocMatchingMemberInternal *)malloc(sizeof(SceNetAdhocMatchingMemberInternal));