From e2c8dab1f0d6747c79d7e9cd8318695f4e3fff3a Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 14 May 2024 14:09:24 +0200 Subject: compare_reindexed_cell_parameters: Small logic fix I was trying to be too clever. The old version breaks if the G6 distance is exactly zero, which happens e.g. in one of the unit tests. --- libcrystfel/src/cell-utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libcrystfel/src/cell-utils.c b/libcrystfel/src/cell-utils.c index 80cdd955..a25accbc 100644 --- a/libcrystfel/src/cell-utils.c +++ b/libcrystfel/src/cell-utils.c @@ -2245,9 +2245,9 @@ static IntegerMatrix *check_permutations(UnitCell *cell_reduced, UnitCell *refer best_diff = diff; n_best = 0; - } + best_m[n_best++] = intmat_copy(m); - if ( diff < 1.001*best_diff ) { + } else if ( diff < 1.001*best_diff ) { /* If the new solution is the same as the * previous one, add it to the list */ -- cgit v1.2.3