diff options
author | Thomas White <taw@physics.org> | 2014-03-06 17:55:58 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-03-06 17:55:58 +0100 |
commit | a2637fde88a99e222c98a15ed214f673a083821d (patch) | |
tree | cf5ea3dbd4e77a26597442872d74726ca6989547 | |
parent | fc647d846dc8fbec9ef13c41382be260ff5e8e9a (diff) |
Don't break if there are no reflections in the list
-rw-r--r-- | src/ambigator.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ambigator.c b/src/ambigator.c index fe295cf7..018ed186 100644 --- a/src/ambigator.c +++ b/src/ambigator.c @@ -245,6 +245,11 @@ static float corr(struct flist *a, struct flist *b, int *pn, int a_reidx) ia = a->i; } + if ( (a->n == 0) || (b->n == 0) ) { + *pn = 0; + return 0.0; + } + while ( 1 ) { while ( sa[ap] > b->s[bp] ) { |