changeset 1253:303039dd9e05 3.0-integration

Fix omitted topmost bin
author Chris Cannam
date Fri, 04 Nov 2016 16:44:59 +0000
parents 2ff5e411151d
children ca9032dd2811
files base/ColumnOp.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/base/ColumnOp.h	Fri Nov 04 16:01:37 2016 +0000
+++ b/base/ColumnOp.h	Fri Nov 04 16:44:59 2016 +0000
@@ -194,9 +194,9 @@
 		int by0 = int(sy0 + 0.0001);
 		int by1 = int(sy1 + 0.0001);
 		if (by1 < by0 + 1) by1 = by0 + 1;
-                if (by1 >= bins) by1 = by1 - 1;
+                if (by1 >= bins) by1 = bins - 1;
                 
-		for (int bin = by0; bin < by1; ++bin) {
+		for (int bin = by0; bin <= by1; ++bin) {
 
 		    float value = in[bin];