aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-09-16 14:14:10 +0200
committerThomas White <taw@physics.org>2020-09-16 14:14:10 +0200
commit8fbb6c4173531734ca287681f86fe8b3c673cdd4 (patch)
tree655551cb93098473c29c5f8303a718a37ce825fd
parent4b28471c9a69c2e15f7ce802e2cba4605163ed0c (diff)
Fix incorrect logic in HDF5 expansion
-rw-r--r--libcrystfel/src/image-hdf5.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcrystfel/src/image-hdf5.c b/libcrystfel/src/image-hdf5.c
index 3ba2178a..87c68bb4 100644
--- a/libcrystfel/src/image-hdf5.c
+++ b/libcrystfel/src/image-hdf5.c
@@ -1314,7 +1314,7 @@ static int rec_expand_paths(hid_t gh, struct ev_list *list,
}
if ( H5Oget_info_by_idx(gh, ".", H5_INDEX_NAME,
- H5_ITER_INC, i, &obj_info, 0) )
+ H5_ITER_INC, i, &obj_info, 0) < 0 )
{
ERROR("Couldn't get info\n");
free(name);
@@ -1326,7 +1326,7 @@ static int rec_expand_paths(hid_t gh, struct ev_list *list,
hid_t child_gh;
- if ( n_pattern_bits == 0 ) {
+ if ( n_pattern_bits == 1 ) {
ERROR("Pattern doesn't match file"
" (too short)\n");
free(name);