aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2003-10-23 10:07:25 +0000
committertradke <tradke@7842ec3a-9562-4be5-9c5b-06ba18f2b668>2003-10-23 10:07:25 +0000
commit9d4abf076e118cae1ab110f58b502d5b5c305636 (patch)
tree8f2e2829eb84cc67c3ab7905f85e81f47ee87db7
parent427b0bc65e861a34b718c1ca5786fbd4f7a84d14 (diff)
Fix for recovery of grid scalars: their rank should be compared against 0 now.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@98 7842ec3a-9562-4be5-9c5b-06ba18f2b668
-rw-r--r--src/RecoverVar.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/RecoverVar.c b/src/RecoverVar.c
index 980d653..4a5b56f 100644
--- a/src/RecoverVar.c
+++ b/src/RecoverVar.c
@@ -442,12 +442,8 @@ static int GetCommonAttributes (cGH *GH,
HDF5_ERROR (dataspace = H5Dget_space (dataset));
HDF5_ERROR (rank_stored = H5Sget_simple_extent_ndims (dataspace));
/* scalars are stored as rank 0 in HDF5 but have rank 1 in Cactus */
- if (rank_stored == 0)
- {
- rank_stored = 1;
- dims_stored = NULL;
- }
- else
+ dims_stored = NULL;
+ if (rank_stored > 0)
{
dims_stored = (hsize_t *) malloc (rank_stored * sizeof (hsize_t));
HDF5_ERROR (H5Sget_simple_extent_dims (dataspace, dims_stored, NULL));