aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-07-16 17:08:25 +0200
committerThomas White <taw@physics.org>2019-07-16 17:08:25 +0200
commit1af8fa298dec785f8934d203f461f983ae8d42e3 (patch)
treeadd358a9e144d2dcd0633fc46cdeb9c4ae3e3bac
parentff4b3d002c42a6663e8bd521ecdd60acf21edcc7 (diff)
hdfile_get_value(): Increase maximum number of dimensions to 64
3 might be too low for a hypothetical file format with, say, two wildcard dimensions.
-rw-r--r--libcrystfel/src/hdf5-file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index dc6ce84a..33ae123b 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -1179,7 +1179,7 @@ int hdfile_get_value(struct hdfile *f, const char *name, struct event *ev,
hsize_t m_offset[1];
hsize_t m_count[1];
hsize_t msdims[1];
- hsize_t size[3];
+ hsize_t size[64];
herr_t r;
herr_t check;
int check_pe;
@@ -1215,7 +1215,8 @@ int hdfile_get_value(struct hdfile *f, const char *name, struct event *ev,
* arrays with all dimensions 1, as well as zero-d arrays. */
sh = H5Dget_space(dh);
ndims = H5Sget_simple_extent_ndims(sh);
- if ( ndims > 3 ) {
+ if ( ndims > 64 ) {
+ ERROR("Too many dimensions for hdfile_get_value\n");
H5Tclose(type);
H5Dclose(dh);
return 1;