aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/check_hkl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/check_hkl.c b/src/check_hkl.c
index 018200cf..ba577d45 100644
--- a/src/check_hkl.c
+++ b/src/check_hkl.c
@@ -95,6 +95,11 @@ static int add_ltest(RefList *list, double i1, int *bins, int nbins,
i2 = get_intensity(refl);
L = (i1-i2) / (i1+i2);
+ if ( isnan(L) ) {
+ /* This happens with --zero-negs and two negative intensities,
+ * because L=(0-0)/(0+0) */
+ return 0;
+ }
bin = fabs(L)/step;
if ( (bin < 0) || (isnan(L)) ) {