oleaut32: Fix buffer increment step for VT_RECORD case doing SafeArrayCopyData().
This commit is contained in:
parent
598f3f0623
commit
4da741daf1
|
@ -401,7 +401,6 @@ static HRESULT SAFEARRAY_CopyData(SAFEARRAY *psa, SAFEARRAY *dest)
|
||||||
}
|
}
|
||||||
else if (psa->fFeatures & FADF_RECORD)
|
else if (psa->fFeatures & FADF_RECORD)
|
||||||
{
|
{
|
||||||
const SAFEARRAYBOUND* psab = psa->rgsabound;
|
|
||||||
BYTE *dest_data = dest->pvData;
|
BYTE *dest_data = dest->pvData;
|
||||||
BYTE *src_data = psa->pvData;
|
BYTE *src_data = psa->pvData;
|
||||||
IRecordInfo *record;
|
IRecordInfo *record;
|
||||||
|
@ -412,11 +411,14 @@ static HRESULT SAFEARRAY_CopyData(SAFEARRAY *psa, SAFEARRAY *dest)
|
||||||
/* RecordCopy() clears destination record */
|
/* RecordCopy() clears destination record */
|
||||||
hr = IRecordInfo_RecordCopy(record, src_data, dest_data);
|
hr = IRecordInfo_RecordCopy(record, src_data, dest_data);
|
||||||
if (FAILED(hr)) break;
|
if (FAILED(hr)) break;
|
||||||
src_data += psab->cElements;
|
src_data += psa->cbElements;
|
||||||
dest_data += psab->cElements;
|
dest_data += psa->cbElements;
|
||||||
}
|
}
|
||||||
|
|
||||||
SafeArraySetRecordInfo(dest, record);
|
SafeArraySetRecordInfo(dest, record);
|
||||||
|
/* This value is set to 32 bytes by default on descriptor creation,
|
||||||
|
update with actual structure size. */
|
||||||
|
dest->cbElements = psa->cbElements;
|
||||||
IRecordInfo_Release(record);
|
IRecordInfo_Release(record);
|
||||||
}
|
}
|
||||||
else if (psa->fFeatures & (FADF_UNKNOWN|FADF_DISPATCH))
|
else if (psa->fFeatures & (FADF_UNKNOWN|FADF_DISPATCH))
|
||||||
|
|
Loading…
Reference in New Issue