* new StrHelper::strzcpy()

This commit is contained in:
Scott Powell committed 2025-02-22 20:10:31 +11:00
1 parent 395b026e6c
commit a896b9c5f7
4 files changed
+13 -3

No files matched your search

+1 -1
View File
@@ -332,7 +332,7 @@ class MyMesh : public BaseChatMesh {
out_frame[i++] = contact.flags;
out_frame[i++] = contact.out_path_len;
memcpy(&out_frame[i], contact.out_path, MAX_PATH_SIZE); i += MAX_PATH_SIZE;
memcpy(&out_frame[i], contact.name, 32); i += 32;
StrHelper::strzcpy((char *) &out_frame[i], contact.name, 32); i += 32;
memcpy(&out_frame[i], &contact.last_advert_timestamp, 4); i += 4;
memcpy(&out_frame[i], &contact.gps_lat, 4); i += 4;
memcpy(&out_frame[i], &contact.gps_lon, 4); i += 4;