Skip to content

Commit 2192971

Browse files
authored
Merge pull request #863 from liamcottle/fix/repeater-login
Fix: repeater login
2 parents b82f5ea + 6a1f8d6 commit 2192971

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/simple_repeater/MyMesh.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ void MyMesh::onAnonDataRecv(mesh::Packet *packet, const uint8_t *secret, const m
405405
uint32_t timestamp;
406406
memcpy(&timestamp, data, 4);
407407

408+
data[len] = 0; // ensure null terminator
408409
uint8_t reply_len = handleLoginReq(sender, secret, timestamp, &data[4]);
409410

410411
if (reply_len == 0) return; // invalid request

0 commit comments

Comments
 (0)