From 206aad5bb2da7f9b97e3b1946a604276cae467e1 Mon Sep 17 00:00:00 2001 From: "Robert E. McGrath" Date: Tue, 1 Mar 2005 13:09:32 -0500 Subject: [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: --- hl/src/H5DS.c | 4 ++-- 1 file 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 */ -- cgit v0.12