summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2002-01-04 02:41:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2002-01-04 02:41:57 (GMT)
commit9c3d062c267e98526c00e0162f222f84e867d49d (patch)
tree2f4a0b6fe928157602a1c58eb272ea2a252d1c0b /src/H5A.c
parent14a242987fa8f44c0ca9ca8798580a4521afe712 (diff)
downloadhdf5-9c3d062c267e98526c00e0162f222f84e867d49d.zip
hdf5-9c3d062c267e98526c00e0162f222f84e867d49d.tar.gz
hdf5-9c3d062c267e98526c00e0162f222f84e867d49d.tar.bz2
[svn-r4772] Purpose:
Bug Fix. Description: Equation to compute size of attribute in memory was incorrectly using the disk's datatype (and dataspace, but that turns out not to have been the actual issue) and when a variable length datatype was used for the attribute, the wrong size is being computed. Also, the variable-length datatype conversions aren't handling the default dataset transfer property list (H5P_DEFAULT) correctly. Solution: Changed attribute code to compute the attribute size in memory correctly by using the memory datatype & dataspace. Changed the variable-length datatype conversion code to use the default dataset transfer property list when H5P_DEFAULT is passed as the property list ID. Platforms tested: FreeBSD 4.5 (sleipnir)
Diffstat (limited to 'src/H5A.c')
-rw-r--r--src/H5A.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 5b474d0..45abb48 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -247,7 +247,7 @@ H5A_create(const H5G_entry_t *ent, const char *name, const H5T_t *type,
/* Compute the internal sizes */
attr->dt_size=(H5O_DTYPE[0].raw_size)(attr->ent.file,type);
attr->ds_size=(H5O_SDSPACE[0].raw_size)(attr->ent.file,&(space->extent.u.simple));
- H5_ASSIGN_OVERFLOW(attr->data_size,H5S_get_simple_extent_npoints(space)*H5T_get_size(type),hssize_t,size_t);
+ H5_ASSIGN_OVERFLOW(attr->data_size,H5S_get_simple_extent_npoints(attr->ds)*H5T_get_size(attr->dt),hssize_t,size_t);
/* Hold the symbol table entry (and file) open */
if (H5O_open(&(attr->ent)) < 0)