diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-08-03 03:37:26 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-08-03 03:37:26 (GMT) |
commit | 71ffe29679654c0675f9b242ef5d2fe65f717ff8 (patch) | |
tree | 7ee9cfcc831a6670f29795b19d4964eefb1d4402 | |
parent | 2ac16dbb1cc256b231400c8919726943124a51bf (diff) | |
download | hdf5-71ffe29679654c0675f9b242ef5d2fe65f717ff8.zip hdf5-71ffe29679654c0675f9b242ef5d2fe65f717ff8.tar.gz hdf5-71ffe29679654c0675f9b242ef5d2fe65f717ff8.tar.bz2 |
[svn-r8998] Purpose:
Bug fix
Description:
Correct assertion and fix minor bug with encoding of "older" style
layout information which is updated by writing data to a previously empty
dataset.
Platforms tested:
FreeBSD 4.10 (sleipnir)
Too minor to require h5committest
-rw-r--r-- | src/H5Olayout.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/H5Olayout.c b/src/H5Olayout.c index 1839343..1918924 100644 --- a/src/H5Olayout.c +++ b/src/H5Olayout.c @@ -271,8 +271,14 @@ H5O_layout_encode(H5F_t *f, uint8_t *p, const void *_mesg) /* Check for which information to write */ if(mesg->version<3) { /* number of dimensions */ - assert(mesg->unused.ndims > 0 && mesg->unused.ndims <= H5O_LAYOUT_NDIMS); - *p++ = mesg->unused.ndims; + if(mesg->type!=H5D_CHUNKED) { + assert(mesg->unused.ndims > 0 && mesg->unused.ndims <= H5O_LAYOUT_NDIMS); + *p++ = mesg->unused.ndims; + } /* end if */ + else { + assert(mesg->u.chunk.ndims > 0 && mesg->u.chunk.ndims <= H5O_LAYOUT_NDIMS); + *p++ = mesg->u.chunk.ndims; + } /* end else */ /* layout class */ *p++ = mesg->type; |