mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-11-02 10:51:57 +00:00
fix(companion): pack and history files from the card checked, contact loops skip the reserved slots, small UI fixes
- L2 vector packs: a damaged count can't wrap the index size, and an entry pointing past the file is refused. - L2 map share-target list: sized for 40 long channel names and 16 favourites (it could overflow), off the stack. - L2 SD history: a file with an unreadable header is set aside as .bad instead of written over; Delete message history takes those too. - Contact lookups by key or hash start after the reserved anon slots (an empty one matched a 00 hop hash with a blank name); MessagesScreen uses contactctl::hopName(). - Nearby keeps its selection by public key: deleting a contact shifts the table. - ui-new Live Share target cycle holds every channel and favourite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1491,7 +1491,7 @@ public:
|
||||
}
|
||||
}
|
||||
} else if (prefix) {
|
||||
for (int idx = 0; ; idx++) {
|
||||
for (int idx = MAX_ANON_CONTACTS; ; idx++) {
|
||||
ContactInfo c;
|
||||
if (!the_mesh.getContactByIdx(idx, c)) break;
|
||||
if (memcmp(c.id.pub_key, prefix, NodePrefs::FAVOURITE_PREFIX_LEN) == 0) {
|
||||
@@ -1673,7 +1673,7 @@ public:
|
||||
_task->openChannelHistory(pfx[0]);
|
||||
return true;
|
||||
}
|
||||
for (int idx = 0; ; idx++) {
|
||||
for (int idx = MAX_ANON_CONTACTS; ; idx++) {
|
||||
ContactInfo c2;
|
||||
if (!the_mesh.getContactByIdx(idx, c2)) break;
|
||||
if (memcmp(c2.id.pub_key, pfx, NodePrefs::FAVOURITE_PREFIX_LEN) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user