Huw Davies : oleaut32: Use the helper to access bstr_t.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jan 21 11:22:05 CST 2016
Module: wine
Branch: master
Commit: 13bc86c03422d381ae7bf19a6132d370e93a7675
URL: http://source.winehq.org/git/wine.git/?a=commit;h=13bc86c03422d381ae7bf19a6132d370e93a7675
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Jan 21 10:29:49 2016 +0000
oleaut32: Use the helper to access bstr_t.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/oleaut32/oleaut.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/oleaut32/oleaut.c b/dlls/oleaut32/oleaut.c
index 214421c..8a22c2e 100644
--- a/dlls/oleaut32/oleaut.c
+++ b/dlls/oleaut32/oleaut.c
@@ -360,7 +360,8 @@ int WINAPI SysReAllocStringLen(BSTR* old, const OLECHAR* str, unsigned int len)
if (*old!=NULL) {
BSTR old_copy = *old;
DWORD newbytelen = len*sizeof(WCHAR);
- bstr_t *bstr = HeapReAlloc(GetProcessHeap(),0,((DWORD*)*old)-1,bstr_alloc_size(newbytelen));
+ bstr_t *old_bstr = bstr_from_str(*old);
+ bstr_t *bstr = HeapReAlloc(GetProcessHeap(), 0, old_bstr, bstr_alloc_size(newbytelen));
*old = bstr->u.str;
bstr->size = newbytelen;
/* Subtle hidden feature: The old string data is still there
More information about the wine-cvs
mailing list