aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-02-09 15:20:08 +0100
committerThomas White <taw@physics.org>2012-02-22 15:27:14 +0100
commit990fd486a0dc069d81344c9f6370f1a80e3d5ec9 (patch)
tree1746b55d20feb7afded301eb6d1fca08df09cf55 /tests
parentdbd140ab417ef5eaf5767007b5d120a21c9f4fea (diff)
Don't use next_found_refl() on a reflection we just freed
Diffstat (limited to 'tests')
-rw-r--r--tests/list_check.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/list_check.c b/tests/list_check.c
index 08bb09d5..04b337d0 100644
--- a/tests/list_check.c
+++ b/tests/list_check.c
@@ -201,15 +201,14 @@ static int test_lists(int num_items)
l = check[i].l;
refl = find_refl(list, h, k, l);
- printf("%i copies remaining, %p\n", check[i].num, refl);
-
do {
int j;
signed int ha, ka, la;
+ Reflection *next;
get_indices(refl, &ha, &ka, &la);
- printf("removing %p %i %i %i\n", refl, ha, ka, la);
+ next = next_found_refl(refl);
delete_refl(refl);
- refl = next_found_refl(refl);
+ refl = next;
for ( j=0; j<num_items; j++ ) {
if ( (check[j].h == h) && (check[j].k == k)
&& (check[j].l == l) ) check[j].num--;