Andrew Eikum : oleaut32: Properly mask size from funcdesc typedata.

Alexandre Julliard julliard at winehq.org
Mon Aug 23 10:50:14 CDT 2010


Module: wine
Branch: master
Commit: 471475ec28885c8cc160b41a575466ae205676b7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=471475ec28885c8cc160b41a575466ae205676b7

Author: Andrew Eikum <aeikum at codeweavers.com>
Date:   Fri Aug 20 14:59:09 2010 -0500

oleaut32: Properly mask size from funcdesc typedata.

The high word of a funcdesc's typedata[0] is used for other data and needs
to be masked out.

---

 dlls/oleaut32/typelib2.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/oleaut32/typelib2.c b/dlls/oleaut32/typelib2.c
index ef43cab..84c51a2 100644
--- a/dlls/oleaut32/typelib2.c
+++ b/dlls/oleaut32/typelib2.c
@@ -2293,7 +2293,7 @@ static HRESULT WINAPI ICreateTypeInfo2_fnSetFuncAndParamNames(
     if (*((INT*)namedata) == -1)
 	    *((INT *)namedata) = This->typelib->typelib_typeinfo_offsets[This->typeinfo->typekind >> 16];
 
-    len = iter->u.data[0]/4 - iter->u.data[5]*3;
+    len = (iter->u.data[0]&0xFFFF)/4 - iter->u.data[5]*3;
 
     for (i = 1; i < cNames; i++) {
 	offset = ctl2_alloc_name(This->typelib, rgszNames[i]);
@@ -3327,7 +3327,7 @@ static HRESULT WINAPI ITypeInfo2_fnGetDocumentation(
                 if (iter->indice == memid) {
                     if (iter->type == CyclicListFunc) {
                         const int *typedata = iter->u.data;
-                        int   size = typedata[0] - typedata[5]*(typedata[4]&0x1000?16:12);
+                        int   size = (typedata[0]&0xFFFF) - typedata[5]*(typedata[4]&0x1000?16:12);
 
                         nameoffset = iter->name;
                         /* FIXME implement this once SetFuncDocString is implemented */




More information about the wine-cvs mailing list