[svn-r181] Reset hyperslab selection changing changing dataspace dimensions.

This commit is contained in:
Quincey Koziol 1998-01-28 07:46:26 -05:00
parent faab4bbf1b
commit b1f57d906e

View File

@ -908,6 +908,16 @@ H5Pset_space(hid_t sid, intn rank, const size_t *dims)
} /* end switch */
space->type = H5P_SIMPLE;
/* Reset hyperslab definition, if one is defined */
if(space->hslab_def==TRUE)
{
H5MM_xfree(space->h.start);
H5MM_xfree(space->h.count);
H5MM_xfree(space->h.stride);
space->hslab=FALSE;
} /* end if */
if (rank == 0) { /* scalar variable */
space->type = H5P_SCALAR;
space->u.simple.rank = 0; /* set to scalar rank */