diff options
author | Thomas White <taw@physics.org> | 2011-06-30 17:11:50 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:31 +0100 |
commit | 736768ba3b54f9c1520ea2ae6547cde6df05bcad (patch) | |
tree | 43a3955069fe3821659da82c6330cfe771fff862 /src/cell.c | |
parent | 98c2349ffc47d4d7945e33b3a2279df2895a7b4d (diff) |
Disallow e.g. "1 1 0" when comparing cells
Diffstat (limited to 'src/cell.c')
-rw-r--r-- | src/cell.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -713,6 +713,10 @@ UnitCell *match_cell(UnitCell *cell, UnitCell *template, int verbose, n2 = (n2l>=0) ? (n2l) : (1.0/n2l); n3 = (n3l>=0) ? (n3l) : (1.0/n3l); + if ( !reduce ) { + if ( n1l + n2l + n3l > 1 ) continue; + } + /* 'bit' values can be +1 or -1 */ for ( b1=-1; b1<=1; b1+=2 ) { for ( b2=-1; b2<=1; b2+=2 ) { |