diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2013-02-11 02:06:01 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2013-02-11 02:06:01 (GMT) |
commit | 871b69723e764114578c2c88f125d8ce6ce57597 (patch) | |
tree | 8db4347ca7b4c49d7492f4a5e5fd1f5cba4c8857 /hl/src/H5DS.c | |
parent | 944f0399ac73a622dcfb03c42dbfad4ecc2948ed (diff) | |
download | hdf5-871b69723e764114578c2c88f125d8ce6ce57597.zip hdf5-871b69723e764114578c2c88f125d8ce6ce57597.tar.gz hdf5-871b69723e764114578c2c88f125d8ce6ce57597.tar.bz2 |
[svn-r23241] Fix for: HDFFV-7596 H5DSget_scale returns size that includes NULL termination and H5DSget_label returns size
Updated tests.
Tested: jam( gnu, intel)
Diffstat (limited to 'hl/src/H5DS.c')
-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 e9ea9cf..cb3a1ce 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: |