From 9679d64e163b463ee7380a91fccf93774fbb3d58 Mon Sep 17 00:00:00 2001 From: Peter Cao Date: Mon, 5 Mar 2007 15:37:33 -0500 Subject: [svn-r13457] Fix problem on copying reg_ref attributes. --- src/H5Oattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 */ -- cgit v0.12