summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Cao <xcao@hdfgroup.org>2007-03-05 20:37:33 (GMT)
committerPeter Cao <xcao@hdfgroup.org>2007-03-05 20:37:33 (GMT)
commit9679d64e163b463ee7380a91fccf93774fbb3d58 (patch)
tree41a2304190be6c10442174e9e1fa105a62e9c7db
parent010ce9ac7bae1c7a92ce0cb73c3ae60b0c033796 (diff)
downloadhdf5-9679d64e163b463ee7380a91fccf93774fbb3d58.zip
hdf5-9679d64e163b463ee7380a91fccf93774fbb3d58.tar.gz
hdf5-9679d64e163b463ee7380a91fccf93774fbb3d58.tar.bz2
[svn-r13457] Fix problem on copying reg_ref attributes.
-rw-r--r--src/H5Oattr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index d3d246d..545ef53 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -918,12 +918,13 @@ H5O_attr_copy_file(H5F_t *file_src, const H5O_msg_class_t UNUSED *mesg_type,
size_t ref_count;
/* Determine # of reference elements to copy */
- ref_count = attr_dst->data_size / attr_dst->dt_size;
+ ref_count = attr_dst->data_size / H5T_get_size(attr_dst->dt);
/* Copy objects referenced in source buffer to destination file and set destination elements */
if(H5O_copy_expand_ref(file_src, attr_src->data, dxpl_id,
file_dst, attr_dst->data, ref_count, H5T_get_ref_type(attr_src->dt), cpy_info) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTCOPY, NULL, "unable to copy reference attribute")
+
} /* end if */
else
/* Reset value to zero */