mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-11 16:49:27 +01:00
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 <noreply@anthropic.com>
This commit is contained in:
1 parent
db7c9ede34
commit
ae906cb292
1 file changed
+5
@@ -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));
|
||||
|
||||
|
||||
Reference in new issue
Block a user