From ff16b32499e98348b4034aa4812c197ea86e4af6 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Mon, 12 Jan 2004 21:06:30 +0000 Subject: [PATCH] SafeArrayRedim: Use the correct size for resize too. --- dlls/oleaut32/safearray.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/oleaut32/safearray.c b/dlls/oleaut32/safearray.c index 93d51869ead..9f008512300 100644 --- a/dlls/oleaut32/safearray.c +++ b/dlls/oleaut32/safearray.c @@ -1457,7 +1457,7 @@ HRESULT WINAPI SafeArrayRedim(SAFEARRAY *psa, SAFEARRAYBOUND *psabound) ULONG ulOldSize, ulNewSize; PVOID pvNewData; - ulOldSize = SAFEARRAY_GetCellCount(psa); + ulOldSize = SAFEARRAY_GetCellCount(psa) * psa->cbElements; if (ulOldSize) ulNewSize = (ulOldSize / oldBounds->cElements) * psabound->cElements; else {