diff options
author | Thomas White <taw@physics.org> | 2016-10-19 14:12:46 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2016-10-19 14:12:46 +0200 |
commit | 4b1136b3cdb9b32126f908415af59bccaa9542ea (patch) | |
tree | cd9afcd0d8e2be87b86095c0587f414aedc975ea /libcrystfel | |
parent | c4e633fa9dd70af035fe2edcab3825fd6c71c4e0 (diff) |
Fix iteration bounds
Diffstat (limited to 'libcrystfel')
-rw-r--r-- | libcrystfel/src/taketwo.c | 4 |
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]); |