aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcrystfel/src/peakfinder8.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcrystfel/src/peakfinder8.c b/libcrystfel/src/peakfinder8.c
index 82a7e316..9ad0e4bd 100644
--- a/libcrystfel/src/peakfinder8.c
+++ b/libcrystfel/src/peakfinder8.c
@@ -1036,6 +1036,8 @@ int peakfinder8(struct image *img, int max_n_peaks,
peaks_to_add = max_n_peaks;
}
+ max_n_peaks -= peaks_to_add;
+
for ( pki=0 ; pki<peaks_to_add ; pki++ ) {
struct panel *p;