diff options
author | Thomas White <taw@physics.org> | 2023-06-06 14:30:33 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2023-06-06 14:30:33 +0200 |
commit | d1968971d3f1456df1af7d976d56aaf3a54ac1f2 (patch) | |
tree | 32b1f9e5eaabda567a70c7b63f67d62516f8e8ba | |
parent | 117ed0d0339163e04290349f9fe468b4bb6982e7 (diff) |
MsgPack: Complain if geometry file has placeholder dimensions or stacked panels
-rw-r--r-- | libcrystfel/src/image-msgpack.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcrystfel/src/image-msgpack.c b/libcrystfel/src/image-msgpack.c index f6d6f2dd..d1752f91 100644 --- a/libcrystfel/src/image-msgpack.c +++ b/libcrystfel/src/image-msgpack.c @@ -326,6 +326,15 @@ static int load_msgpack_data(struct panel_template *p, msgpack_object *data_obj; char *dtype; int data_size_fs, data_size_ss; + int i; + + for ( i=0; i<MAX_DIMS; i++ ) { + if ( (p->dims[i] >= 0) || (p->dims[i] == DIM_PLACEHOLDER) ) { + ERROR("Only a single 2D array is supported via MsgPack.\n"); + ERROR("Check the geometry file and remove 'dimX = %' and 'dimX = <n>'\n"); + return 1; + } + } obj = find_msgpack_kv(map_obj, p->data); if ( obj == NULL ) { |