From f94d9d48ca7000087dab46e78ec9ea4b48939b32 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 25 May 1999 21:07:22 -0500 Subject: [svn-r1278] Added size of userblock to base address of the low-level eof to correct bug. --- src/H5F.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/H5F.c b/src/H5F.c index cb9e9d2..b76eefb 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -1675,9 +1675,18 @@ H5F_flush(H5F_t *f, H5F_scope_t scope, hbool_t invalidate) /* update file length if necessary */ if (!H5F_addr_defined(&(f->shared->hdf5_eof))) { - H5F_addr_reset(&(f->shared->hdf5_eof)); - H5F_addr_inc(&(f->shared->hdf5_eof), (hsize_t)(p-buf)); - H5F_low_seteof(f->shared->lf, &(f->shared->hdf5_eof)); + haddr_t t_addr; /*temporary address */ + + /* Set the HDF5 file size */ + H5F_addr_reset(&(f->shared->hdf5_eof)); + H5F_addr_inc(&(f->shared->hdf5_eof), (hsize_t)(p-buf)); + + /* Set the logical file size, including the userblock data */ + t_addr = f->shared->hdf5_eof; + H5F_addr_add(&t_addr, &(f->shared->base_addr)); + H5F_low_seteof(f->shared->lf, &t_addr); + + /* Indicate that the boot block needs to be flushed out */ firsttime_bootblock=1; } -- cgit v0.12