aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-02-27 14:51:18 +0100
committerThomas White <taw@physics.org>2013-02-27 14:51:18 +0100
commit22cd1d08e6eeb6c8e43a709021746c057f6661d7 (patch)
treefccf429c65afb29957fa0fd6717cc0dae36f5924
parent4dfa8ed5e47fedc4fa570c80efeb1c548ea90cdc (diff)
compare_hkl: Fix bounds of resolution shells
-rw-r--r--src/compare_hkl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/compare_hkl.c b/src/compare_hkl.c
index c3e7a547..f0484ede 100644
--- a/src/compare_hkl.c
+++ b/src/compare_hkl.c
@@ -464,6 +464,7 @@ static int get_bin(struct shells *s, Reflection *refl, UnitCell *cell)
/* Allow for slight rounding errors */
if ( (bin == -1) && (d <= s->rmins[0]) ) bin = 0;
+ if ( (bin == -1) && (d >= s->rmaxs[s->nshells-1]) ) bin = 0;
assert(bin != -1);
return bin;