diff options
Diffstat (limited to 'libcrystfel/src')
-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]++; |