From 37edf303a2b0614538e057179f508558b7f5d891 Mon Sep 17 00:00:00 2001 From: liquidraver <504870+liquidraver@users.noreply.github.com> Date: Sun, 7 Jun 2026 12:51:31 +0200 Subject: [PATCH] fix MAX_ANON_CONTACTS --- zephcore/helpers/BaseChatMesh.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zephcore/helpers/BaseChatMesh.cpp b/zephcore/helpers/BaseChatMesh.cpp index d348408..db42b51 100644 --- a/zephcore/helpers/BaseChatMesh.cpp +++ b/zephcore/helpers/BaseChatMesh.cpp @@ -84,7 +84,8 @@ void BaseChatMesh::bootstrapRTCfromContacts() ContactInfo *BaseChatMesh::allocateContactSlot(bool transient_only) { - if (num_contacts < MAX_CONTACTS) { + int max_slots = transient_only ? (MAX_CONTACTS + MAX_ANON_CONTACTS) : MAX_CONTACTS; + if (num_contacts < max_slots) { return &contacts[num_contacts++]; } else if (transient_only || shouldOverwriteWhenFull()) { int oldest_idx = -1;