diff options
Diffstat (limited to 'src/components/ble/ImmediateAlertService.cpp')
| -rw-r--r-- | src/components/ble/ImmediateAlertService.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/ble/ImmediateAlertService.cpp b/src/components/ble/ImmediateAlertService.cpp index b9de615a..e25e018f 100644 --- a/src/components/ble/ImmediateAlertService.cpp +++ b/src/components/ble/ImmediateAlertService.cpp @@ -63,7 +63,8 @@ int ImmediateAlertService::OnAlertLevelChanged(uint16_t attributeHandle, ble_gat auto* alertString = ToString(alertLevel); NotificationManager::Notification notif; - std::memcpy(notif.message.data(), alertString, strlen(alertString)); + std::memcpy(notif.message.data(), alertString, strlen(alertString) + 1); + notif.size = strlen(alertString) + 1; notif.category = Pinetime::Controllers::NotificationManager::Categories::SimpleAlert; notificationManager.Push(std::move(notif)); |
