PATCH: safearray redim

Marcus Meissner marcus at jet.franken.de
Sat Jan 10 10:48:29 CST 2004


Hmpf,

both safearrayredim cases were broken, i just fixed the first one.

Ciao, Marcus

Changelog:
	SafeArrayRedim: Use the correct size for resize too.

Index: dlls/oleaut32/safearray.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/safearray.c,v
retrieving revision 1.32
diff -u -r1.32 safearray.c
--- dlls/oleaut32/safearray.c	9 Jan 2004 00:58:01 -0000	1.32
+++ dlls/oleaut32/safearray.c	10 Jan 2004 16:41:04 -0000
@@ -1457,7 +1470,7 @@
       ULONG ulOldSize, ulNewSize;
       PVOID pvNewData;
 
-      ulOldSize = SAFEARRAY_GetCellCount(psa);
+      ulOldSize = SAFEARRAY_GetCellCount(psa) * psa->cbElements;
       if (ulOldSize)
         ulNewSize = (ulOldSize / oldBounds->cElements) * psabound->cElements;
       else {



More information about the wine-patches mailing list