mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* companion: bug fix for CMD_ADD_UPDATE_CONTACT
This commit is contained in:
parent
84eafe4752
commit
f66d900ae2
1 changed files with 2 additions and 2 deletions
|
|
@ -166,12 +166,12 @@ void MyMesh::updateContactFromFrame(ContactInfo &contact, uint32_t& last_mod, co
|
|||
i += 32;
|
||||
memcpy(&contact.last_advert_timestamp, &frame[i], 4);
|
||||
i += 4;
|
||||
if (i + 8 >= len) { // optional fields
|
||||
if (len >= i + 8) { // optional fields
|
||||
memcpy(&contact.gps_lat, &frame[i], 4);
|
||||
i += 4;
|
||||
memcpy(&contact.gps_lon, &frame[i], 4);
|
||||
i += 4;
|
||||
if (i + 4 >= len) {
|
||||
if (len >= i + 4) {
|
||||
memcpy(&last_mod, &frame[i], 4);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue