summaryrefslogtreecommitdiffstats
path: root/src/H5Adense.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-07-18 02:08:37 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-07-18 02:08:37 (GMT)
commitc55d0f4e1e09e813fec5fcaa0541150c1ee2a36f (patch)
tree9d288066d5140d72c7f27cef72b01274731ab5bd /src/H5Adense.c
parent2ed54543c8a45e3315d53ba5c1c44e33a98b5c73 (diff)
downloadhdf5-c55d0f4e1e09e813fec5fcaa0541150c1ee2a36f.zip
hdf5-c55d0f4e1e09e813fec5fcaa0541150c1ee2a36f.tar.gz
hdf5-c55d0f4e1e09e813fec5fcaa0541150c1ee2a36f.tar.bz2
[svn-r13988] Description:
Fix bug where the version of an attribute would change after it was created, causing the amount of space used to encode it to change. Tested on: Mac OS X/32 10.4.10 (amazon) FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src/H5Adense.c')
-rw-r--r--src/H5Adense.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5Adense.c b/src/H5Adense.c
index e35366a..00628b4 100644
--- a/src/H5Adense.c
+++ b/src/H5Adense.c
@@ -907,6 +907,9 @@ H5A_dense_rename(H5F_t *f, hid_t dxpl_id, const H5O_ainfo_t *ainfo, const char *
H5MM_xfree(attr_copy->name);
attr_copy->name = H5MM_xstrdup(new_name);
+ /* Recompute the version to encode the attribute with */
+ attr_copy->version = H5A_get_version(f, attr_copy);
+
/* Insert renamed attribute back into dense storage */
/* (Possibly making it shared) */
if(H5A_dense_insert(f, dxpl_id, ainfo, attr_copy) < 0)