[svn-r3131] Purpose:

Bug fix
Description:
    Non-optimized conversions have a memory overwrite bug when the destination
    size of a compound datatype is greater than the source size.
Solution:
    Corrected direction of walking through the destination array for final
    copying.
Platforms tested:
    FreeBSD 4.2 (hawkwind) & Cray J90 (killeen)
This commit is contained in:
Quincey Koziol 2000-12-13 18:33:05 -05:00
parent c701e8b89f
commit 1f4c821432

View File

@ -1149,6 +1149,10 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
xbkg += bkg_stride;
}
/* If the bkg_stride was set to -(dst->size), make it positive now */
if(buf_stride==0 && dst->size>src->size)
bkg_stride=dst->size;
/*
* Copy the background buffer back into the in-place conversion
* buffer.