initialize some uninitialized variables
[ardour.git] / libs / canvas / xfade_curve.cc
index c8e477697c47679f2ebeb520830a2b69001f6f2c..e93331e7f987ce8430fb8e5af573d7a137a48e8d 100644 (file)
@@ -185,7 +185,7 @@ XFadeCurve::get_path(Rect const & area, Cairo::RefPtr<Cairo::Context> context, C
                        window_space = item_to_window (Duple (c.samples[idx].x, 0.0), false);
                        if (window_space.x >= area.x0) break;
                }
-               for (Points::size_type idx = c.n_samples; right > left;) {
+               for (Points::size_type idx = c.n_samples - 1; right > left;) {
                        if (--idx <= left) break;
                        window_space = item_to_window (Duple (c.samples[idx].x, 0.0), false);
                        if (window_space.x <= area.x1) break;