aboutsummaryrefslogtreecommitdiff
path: root/src/cell.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-06-30 17:11:50 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:31 +0100
commit736768ba3b54f9c1520ea2ae6547cde6df05bcad (patch)
tree43a3955069fe3821659da82c6330cfe771fff862 /src/cell.c
parent98c2349ffc47d4d7945e33b3a2279df2895a7b4d (diff)
Disallow e.g. "1 1 0" when comparing cells
Diffstat (limited to 'src/cell.c')
-rw-r--r--src/cell.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cell.c b/src/cell.c
index ee00248d..e74657b0 100644
--- a/src/cell.c
+++ b/src/cell.c
@@ -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 ) {