diff options
Diffstat (limited to 'src/H5Odtype.c')
-rw-r--r-- | src/H5Odtype.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/H5Odtype.c b/src/H5Odtype.c index 545531f..ed94cd4 100644 --- a/src/H5Odtype.c +++ b/src/H5Odtype.c @@ -352,6 +352,10 @@ H5O_dtype_decode_helper(H5F_t *f, const uint8_t **pp, H5T_t *dt) case H5T_VLEN: /* Variable length datatypes... */ /* Set the type of VL information, either sequence or string */ dt->u.vlen.type = (H5T_vlen_type_t)(flags & 0x0f); + if(dt->u.vlen.type == H5T_VLEN_STRING) { + dt->u.vlen.pad = (H5T_str_t)((flags>>4) & 0x0f); + dt->u.vlen.cset = (H5T_cset_t)((flags>>8) & 0x0f); + } /* end if */ /* Decode base type of VL information */ if (NULL==(dt->parent = H5FL_ALLOC(H5T_t,1))) @@ -730,6 +734,10 @@ H5O_dtype_encode_helper(uint8_t **pp, const H5T_t *dt) case H5T_VLEN: /* Variable length datatypes... */ flags |= (dt->u.vlen.type & 0x0f); + if(dt->u.vlen.type == H5T_VLEN_STRING) { + flags |= (dt->u.vlen.pad & 0x0f) << 4; + flags |= (dt->u.vlen.cset & 0x0f) << 8; + } /* end if */ /* Encode base type of VL information */ if (H5O_dtype_encode_helper(pp, dt->parent)<0) { |