VarBstrFromI4: No sign extension for negative values

Fabian Cenedese Cenedese at indel.ch
Mon Feb 23 08:08:19 CST 2004


Hi

Another small patch for oleaut32. Without this numbers like 0x80000000 would turn
out as -18446744071562067968 (0xFFFFFFFF80000000) instead of -2147483648.



Changelog:
    Fabian Cenedese <Cenedese at indel.ch>
    No sign extension for negative values


Index: wine/dlls/oleaut32/vartype.c
===================================================================
RCS file: /home/wine/wine/dlls/oleaut32/vartype.c,v
retrieving revision 1.5
diff -u -r1.5 vartype.c
--- wine/dlls/oleaut32/vartype.c	23 Jan 2004 01:51:34 -0000	1.5
+++ wine/dlls/oleaut32/vartype.c	23 Feb 2004 14:00:48 -0000
@@ -5238,7 +5238,7 @@
   if (lIn < 0)
   {
-    ul64 = -lIn;
+    ul64 = ((ULONG64)(-lIn))&0xFFFFFFFF;
     dwFlags |= VAR_NEGATIVE;
   }
   return VARIANT_BstrFromUInt(ul64, lcid, dwFlags, pbstrOut);





More information about the wine-patches mailing list