aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/taketwo.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-10-19 14:12:46 +0200
committerThomas White <taw@physics.org>2016-10-19 14:12:46 +0200
commit4b1136b3cdb9b32126f908415af59bccaa9542ea (patch)
treecd9afcd0d8e2be87b86095c0587f414aedc975ea /libcrystfel/src/taketwo.c
parentc4e633fa9dd70af035fe2edcab3825fd6c71c4e0 (diff)
Fix iteration bounds
Diffstat (limited to 'libcrystfel/src/taketwo.c')
-rw-r--r--libcrystfel/src/taketwo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/taketwo.c b/libcrystfel/src/taketwo.c
index 2befb8b5..b37123e4 100644
--- a/libcrystfel/src/taketwo.c
+++ b/libcrystfel/src/taketwo.c
@@ -714,8 +714,8 @@ static int gen_observed_vecs(struct rvec *rlps, int rlp_count,
double max_sq_length = pow(MAX_RECIP_DISTANCE, 2);
/* Indentation... bending the rules a bit? */
- for ( i=0; i<rlp_count; i++ ) {
- for ( j=0; j<rlp_count; j++ ) {
+ for ( i=0; i<rlp_count-1; i++ ) {
+ for ( j=i+1; j<rlp_count; j++ ) {
/* calculate difference vector between rlps */
struct rvec diff = diff_vec(rlps[i], rlps[j]);