summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>2000-05-16 16:57:46 (GMT)
committerPatrick Lu <ptlu@hawkwind.ncsa.uiuc.edu>2000-05-16 16:57:46 (GMT)
commit1f6bb057e0659e8afcd3210eb621e265e52e51e4 (patch)
treec6340bc32cd574e58bf8a75856977be3cbbee607
parentc089af22eef45f2b2e6dd92e43fb3518c1c19b87 (diff)
downloadhdf5-1f6bb057e0659e8afcd3210eb621e265e52e51e4.zip
hdf5-1f6bb057e0659e8afcd3210eb621e265e52e51e4.tar.gz
hdf5-1f6bb057e0659e8afcd3210eb621e265e52e51e4.tar.bz2
[svn-r2256] same changes i did for the release version. (fixed bug in dangermouse... added
an extra conditional)
-rw-r--r--tools/h5tools.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/h5tools.c b/tools/h5tools.c
index a71116b..1ab45b7 100644
--- a/tools/h5tools.c
+++ b/tools/h5tools.c
@@ -1501,7 +1501,7 @@ h5dump_simple_mem(FILE *stream, const h5dump_t *info, hid_t type,
H5Sget_simple_extent_dims(space, ctx.p_max_idx, NULL);
- for (i=0, nelmts=1; i<(hsize_t)(ctx.ndims); i++) {
+ for (i=0, nelmts=1; (ctx.ndims != 0) && (i<(hsize_t)(ctx.ndims)); i++) {
nelmts *= ctx.p_max_idx[i] - ctx.p_min_idx[i];
}
if (0==nelmts) return 0; /*nothing to print*/