summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-02-04 18:31:13 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-02-04 18:31:13 (GMT)
commit125f36856055f6a6c07cfdac2934e4aef54e8b8e (patch)
treecf3581055ab9945c9d9a89fcc08501a73aec70ca
parenta47ba809eae58fce3902d1f8eec854cf42ff1013 (diff)
downloadhdf5-125f36856055f6a6c07cfdac2934e4aef54e8b8e.zip
hdf5-125f36856055f6a6c07cfdac2934e4aef54e8b8e.tar.gz
hdf5-125f36856055f6a6c07cfdac2934e4aef54e8b8e.tar.bz2
[svn-r219] Changes since 19980204
---------------------- ./src/H5Odtype.c Compound data type names weren't aligned correctly. Thanks to Elena for finding this bug.
-rw-r--r--src/H5Odtype.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 3e23374..9b3777b 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -349,13 +349,10 @@ H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
*/
flags = dt->u.compnd.nmembs & 0xffff;
for (i = 0; i < dt->u.compnd.nmembs; i++) {
+ HDstrcpy (*pp, dt->u.compnd.memb[i].name);
n = strlen(dt->u.compnd.memb[i].name);
- for (j = 0; j <= n && j % 8; j++) {
- if (j < n)
- *(*pp)++ = dt->u.compnd.memb[i].name[j];
- else
- *(*pp)++ = '\0';
- }
+ for (j=n+1; j%8; j++) (*pp)[j] = '\0';
+ *pp += j;
UINT32ENCODE(*pp, dt->u.compnd.memb[i].offset);
*(*pp)++ = dt->u.compnd.memb[i].ndims;
assert(dt->u.compnd.memb[i].ndims <= 4);