From f64e1aab808681502e461857045815f08e32dfed Mon Sep 17 00:00:00 2001 From: NeroBurner Date: Sun, 5 Jun 2022 22:00:50 +0200 Subject: [PATCH] Fix notification segfault (#36) Need to loop the notification_idx after half the notification_messages size since the change of splitting the subject and message body into two strings. --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 19fa8ef..c1b66cd 100644 --- a/main.cpp +++ b/main.cpp @@ -515,7 +515,7 @@ public: notificationManager.Push(std::move(notif)); // send next message the next time notification_idx++; - if (notification_idx >= notification_messages.size()) { + if (notification_idx >= notification_messages.size()/2) { notification_idx = 0; } }