Commit 9560b439 authored by Thomas White's avatar Thomas White
Browse files

hdfile_get_value(): Check that ev->dim_length > 0 before looking in dim_entries

parent 983512db
......@@ -1236,7 +1236,9 @@ int hdfile_get_value(struct hdfile *f, const char *name, struct event *ev,
for ( i=0; i<ndims; i++ ) {
if ( size[i] == 1 ) continue;
if ( ( i==0 ) && (ev != NULL) && (size[i] > ev->dim_entries[0]) ) {
if ( ( i==0 ) && (ev != NULL) && (ev->dim_length > 0)
&& (size[i] > ev->dim_entries[0]) )
{
dim_flag = 1;
} else {
H5Tclose(type);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment