summaryrefslogtreecommitdiffstats
path: root/hl/src
diff options
context:
space:
mode:
authorRobert E. McGrath <mcgrath@ncsa.uiuc.edu>2005-03-01 18:09:32 (GMT)
committerRobert E. McGrath <mcgrath@ncsa.uiuc.edu>2005-03-01 18:09:32 (GMT)
commit206aad5bb2da7f9b97e3b1946a604276cae467e1 (patch)
tree5485e082fb94a823a8b7e6255c11efab13b628e4 /hl/src
parent119bd4c7b1dcdd893c08fc9df623bf4033b9a7cb (diff)
downloadhdf5-206aad5bb2da7f9b97e3b1946a604276cae467e1.zip
hdf5-206aad5bb2da7f9b97e3b1946a604276cae467e1.tar.gz
hdf5-206aad5bb2da7f9b97e3b1946a604276cae467e1.tar.bz2
[svn-r10111] Purpose:
bug fix Description: H5DSget_scale_name, H5DSget_lablel return wrong value when truncating to 1 character array. Solution: fix it. Platforms tested: verbena,shanti,copper Misc. update:
Diffstat (limited to 'hl/src')
-rw-r--r--hl/src/H5DS.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hl/src/H5DS.c b/hl/src/H5DS.c
index 66cb7b4..214769c 100644
--- a/hl/src/H5DS.c
+++ b/hl/src/H5DS.c
@@ -1280,7 +1280,7 @@ ssize_t H5DSget_label(hid_t did,
copy_len = MIN(size-1, nbytes);
/* copy all/some of the name */
- if( label && copy_len>0) {
+ if( label ) {
HDmemcpy(label, buf[idx], copy_len);
/* terminate the string */
@@ -1404,7 +1404,7 @@ ssize_t H5DSget_scale_name(hid_t did,
copy_len = MIN(size-1, nbytes);
/* copy all/some of the name */
- if (name && copy_len>0) {
+ if (name) {
HDmemcpy(name, buf, copy_len);
/* terminate the string */