typelib: fix for packed VARIANT reading

Huw D M Davies h.davies1 at physics.ox.ac.uk
Fri Jan 7 07:36:46 CST 2005


        Huw Davies <huw at codeweavers.com>
        The value of a packed VARIANT can be up to 1L << 26 - 1
-- 
Huw Davies
huw at codeweavers.com
Index: dlls/oleaut32/typelib.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/typelib.c,v
retrieving revision 1.137
diff -u -p -r1.137 typelib.c
--- dlls/oleaut32/typelib.c	17 Dec 2004 18:56:49 -0000	1.137
+++ dlls/oleaut32/typelib.c	7 Jan 2005 13:31:12 -0000
@@ -1516,7 +1516,7 @@ static void MSFT_ReadValue( VARIANT * pV
 
     if(offset <0) { /* data are packed in here */
         V_VT(pVar) = (offset & 0x7c000000 )>> 26;
-        V_UNION(pVar, iVal) = offset & 0xffff;
+        V_UNION(pVar, iVal) = offset & 0x3ffffff;
         return;
     }
     MSFT_ReadLEWords(&(V_VT(pVar)), sizeof(VARTYPE), pcx,



More information about the wine-patches mailing list