diff options
author | Thomas White <taw@physics.org> | 2013-11-24 17:09:00 -0800 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2013-11-24 17:09:00 -0800 |
commit | aeb57b6b917acc4ea573abda506601422635ba44 (patch) | |
tree | 021ae4c5826ba0ac35d27e24d1184bb945722074 /libcrystfel | |
parent | 660e891c1a6a6ea0030ba5a63b2cc0e38e7cabcf (diff) |
Fix an oops in Histogram
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/histogram.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/histogram.c b/libcrystfel/src/histogram.c index b232cc24..ceefbe4b 100644 --- a/libcrystfel/src/histogram.c +++ b/libcrystfel/src/histogram.c @@ -136,7 +136,7 @@ static void calc_bins(Histogram *hi) /* Tidy up rounding errors */ if ( j < 0 ) j = 0; - if ( j > hi->n_bins ) j = hi->n_bins - 1; + if ( j >= hi->n_bins ) j = hi->n_bins - 1; hi->bins[j]++; |