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.
This commit is contained in:
		
							parent
							
								
									6313a7498b
								
							
						
					
					
						commit
						f64e1aab80
					
				
							
								
								
									
										2
									
								
								main.cpp
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.cpp
									
									
									
									
									
								
							@ -515,7 +515,7 @@ public:
 | 
				
			|||||||
      notificationManager.Push(std::move(notif));
 | 
					      notificationManager.Push(std::move(notif));
 | 
				
			||||||
      // send next message the next time
 | 
					      // send next message the next time
 | 
				
			||||||
      notification_idx++;
 | 
					      notification_idx++;
 | 
				
			||||||
      if (notification_idx >= notification_messages.size()) {
 | 
					      if (notification_idx >= notification_messages.size()/2) {
 | 
				
			||||||
        notification_idx = 0;
 | 
					        notification_idx = 0;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user