diff options
Diffstat (limited to 'src/reflist.c')
-rw-r--r-- | src/reflist.c | 8 |
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 ) { |