diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-05-05 08:36:15 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:25 +0100 |
commit | 512283b33951ad728a44f0706dec4cfa64786f88 (patch) | |
tree | c073512bb79a1ada20587332d7415168851e0da5 | |
parent | 68f64bd227168844306ae3bb983b6cb7a224251f (diff) |
Check that indices are not out of range
-rw-r--r-- | src/reflist.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/reflist.c b/src/reflist.c index d23b952c..d6773a09 100644 --- a/src/reflist.c +++ b/src/reflist.c @@ -577,6 +577,10 @@ Reflection *add_refl(RefList *list, signed int h, signed int k, signed int l) { Reflection *new; + assert(abs(h)<256); + assert(abs(k)<256); + assert(abs(l)<256); + new = new_node(SERIAL(h, k, l)); if ( list->head == NULL ) { |