diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-01-04 02:41:57 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-01-04 02:41:57 (GMT) |
commit | 9c3d062c267e98526c00e0162f222f84e867d49d (patch) | |
tree | 2f4a0b6fe928157602a1c58eb272ea2a252d1c0b /src/H5A.c | |
parent | 14a242987fa8f44c0ca9ca8798580a4521afe712 (diff) | |
download | hdf5-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) |