aboutsummaryrefslogtreecommitdiff
path: root/src/reflist.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-07-27 12:16:39 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:34 +0100
commit0ca816fdeae85779ef4a8100cdc25ec16fc9d735 (patch)
treec9f5d1d21a4030b4c53f755791f660f163b5af3d /src/reflist.c
parent645edae8173996f28686315b05253d4d4db94ccb (diff)
Don't use an array in check_list_symmetry()
Diffstat (limited to 'src/reflist.c')
-rw-r--r--src/reflist.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/reflist.c b/src/reflist.c
index aefbf4e2..45cd132e 100644
--- a/src/reflist.c
+++ b/src/reflist.c
@@ -212,6 +212,14 @@ Reflection *find_refl(const RefList *list,
if ( list->head == NULL ) return NULL;
+ /* Indices greater than or equal to 256 are filtered out when
+ * reflections are added, so don't even bother looking.
+ * (also, looking for such reflections causes trouble because the search
+ * serial number would be invalid) */
+ if ( abs(h) >= 256 ) return NULL;
+ if ( abs(k) >= 256 ) return NULL;
+ if ( abs(l) >= 256 ) return NULL;
+
refl = list->head;
while ( refl != NULL ) {