Qt iograph: Fix off-by-one, insure we plot the last interval.
authorJim Young <jyoung@gsu.edu>
Mon, 16 Nov 2015 03:07:55 +0000 (22:07 -0500)
committerAnders Broman <a.broman58@gmail.com>
Mon, 16 Nov 2015 05:00:36 +0000 (05:00 +0000)
Bug: 11693
Change-Id: I035eaf7ff049e3631714c112daa5adb29bb90470
Reviewed-on: https://code.wireshark.org/review/11858
Reviewed-by: Anders Broman <a.broman58@gmail.com>
ui/qt/io_graph_dialog.cpp

index 0d51ae45b967304cbc57c3ab406801544e3c2796..2e6da60e399fd3fe7069ffa66cb37c86e7827b88 100644 (file)
@@ -2001,7 +2001,7 @@ void IOGraph::recalcGraphData(capture_file *cap_file)
         mavg_to_add = warmup_interval;
     }
 
-    for (int i = 0; i < cur_idx_; i++) {
+    for (int i = 0; i <= cur_idx_; i++) {
         double ts = (double) i * interval_ / 1000;
         if (x_axis && x_axis->tickLabelType() == QCPAxis::ltDateTime) {
             ts += start_time_;