summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
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)