diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2002-11-18 16:38:11 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2002-11-18 16:38:11 (GMT) |
commit | 0105a3b97cabccd3463c82c22da7e3f4d23c2b05 (patch) | |
tree | 9b0002e531446227f62b929adba84b9bfbcacc8a /tools/lib/h5tools_str.c | |
parent | 02fe47462b798e7f212f09fe65f022965ce4b365 (diff) | |
download | hdf5-0105a3b97cabccd3463c82c22da7e3f4d23c2b05.zip hdf5-0105a3b97cabccd3463c82c22da7e3f4d23c2b05.tar.gz hdf5-0105a3b97cabccd3463c82c22da7e3f4d23c2b05.tar.bz2 |
[svn-r6099]
Purpose:
bug fix.
Description:
h5dump cannot dump data and datatype for VL string.
Platforms tested:
eirene, arabica
Misc. update:
MANIFEST, RELEASE.txt
Diffstat (limited to 'tools/lib/h5tools_str.c')
-rw-r--r-- | tools/lib/h5tools_str.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 0820cfb..3cacff0 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -545,7 +545,11 @@ h5tools_str_sprint(h5tools_str_t *str, const h5dump_t *info, hid_t container, unsigned int i; quote = '\0'; - size = H5Tget_size(type); + if(H5Tis_variable_str(type)) { + size = HDstrlen(cp_vp); + } else { + size = H5Tget_size(type); + } pad = H5Tget_strpad(type); for (i = 0; i < size && (cp_vp[i] != '\0' || pad != H5T_STR_NULLTERM); i++) { |