summaryrefslogtreecommitdiffstats
path: root/src/H5Olayout.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Olayout.c')
-rw-r--r--src/H5Olayout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Olayout.c b/src/H5Olayout.c
index f2bfab0..9ca6ba6 100644
--- a/src/H5Olayout.c
+++ b/src/H5Olayout.c
@@ -343,7 +343,8 @@ H5O_layout_encode(H5F_t *f, hbool_t UNUSED disable_shared, uint8_t *p, const voi
HDassert(p);
/* Message version */
- *p++ = (uint8_t)mesg->version;
+ *p++ = (uint8_t)((mesg->version < H5O_LAYOUT_VERSION_3) ?
+ H5O_LAYOUT_VERSION_3 : mesg->version);
/* Layout class */
*p++ = mesg->type;