[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-patches
Subject: PATCH: safearray, missing sizeof
From: Marcus Meissner <marcus () jet ! franken ! de>
Date: 2003-12-31 14:17:08
Message-ID: 20031231141708.GC2458 () jet ! franken ! de
[Download RAW message or body]
Hi,
Stupid bug, size is not just the number of cells, but * elementsize.
Ciao, Marcus
Changelog:
fixed size calculation on redim if old size was 0.
Index: safearray.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/safearray.c,v
retrieving revision 1.30
diff -u -r1.30 safearray.c
--- dlls/oleaut32/safearray.c 30 Dec 2003 19:06:41 -0000 1.30
+++ dlls/oleaut32/safearray.c 31 Dec 2003 14:15:06 -0000
@@ -1463,7 +1466,7 @@
else {
int oldelems = oldBounds->cElements;
oldBounds->cElements = psabound->cElements;
- ulNewSize = SAFEARRAY_GetCellCount(psa);
+ ulNewSize = SAFEARRAY_GetCellCount(psa) * psa->cbElements;
oldBounds->cElements = oldelems;
}
--
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic