From a5b77a59d3827d29263e10b0f1b1b65da7633566 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 29 Mar 2018 12:35:03 -0400 Subject: [PATCH] allow 0 pre_event_count --- src/zm_monitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index ed77a90f8..a492fa90a 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1485,7 +1485,7 @@ bool Monitor::Analyse() { if ( analysis_fps ) { // If analysis fps is set, // compute the index for pre event images in the dedicated buffer - pre_index = image_count%pre_event_buffer_count; + pre_index = pre_event_buffer_count ? image_count%pre_event_buffer_count : 0; // Seek forward the next filled slot in to the buffer (oldest data) // from the current position @@ -1540,7 +1540,7 @@ bool Monitor::Analyse() { if ( analysis_fps ) { // If analysis fps is set, // compute the index for pre event images in the dedicated buffer - pre_index = image_count%pre_event_buffer_count; + pre_index = pre_event_buffer_count ? image_count%pre_event_buffer_count : 0; // Seek forward the next filled slot in to the buffer (oldest data) // from the current position