diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2013-02-18 00:46:21 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2013-02-18 00:46:21 (GMT) |
commit | c3fe96625111e4141ca2f82733a22d43ef757595 (patch) | |
tree | bf49cd7e67dedf4c6499182a74ab433a98c34ab1 /hl/src | |
parent | dd422291e05c2e1deb2797dec6374d8cc521b0ca (diff) | |
download | hdf5-c3fe96625111e4141ca2f82733a22d43ef757595.zip hdf5-c3fe96625111e4141ca2f82733a22d43ef757595.tar.gz hdf5-c3fe96625111e4141ca2f82733a22d43ef757595.tar.bz2 |
[svn-r23291] brought r23241 into the branch.
Fix for: HDFFV-7596
H5DSget_scale returns size that includes NULL termination and H5DSget_label returns size NOT including NULL termination
Diffstat (limited to 'hl/src')
-rw-r--r-- | hl/src/H5DS.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c index 4bc4bc4..c7c1719 100644 --- a/hl/src/H5DS.c +++ b/hl/src/H5DS.c @@ -1779,6 +1779,8 @@ out: * Comments: * * Modifications: +* The size of the name returned should not include the NULL termination +* in its value so as to be consistent with other HDF5 APIs. * *------------------------------------------------------------------------- */ @@ -1875,7 +1877,7 @@ ssize_t H5DSget_scale_name(hid_t did, buf=NULL; } - return (ssize_t) nbytes; + return (ssize_t) MAX(0,nbytes-1); /* error zone */ out: |