Changelog
------------
fixed DECIMAL_SETZERO
removed a workaround for the former problem
--- ../wine/include/wtypes.h Mon Mar 17 00:54:18 2003
+++ include/wtypes.h Wed May 14 21:24:30 2003
@@ -666,7 +666,7 @@
} DECIMAL;
#endif
#define DECIMAL_NEG ((BYTE)0x80)
-#define DECIMAL_SETZERO(d) do{ memset(((char*)(d)) + sizeof(USHORT), 0, sizeof(ULONG) * 3u); }while (0)
+#define DECIMAL_SETZERO(d) do{ memset(((char*)(d)) + sizeof(USHORT), 0, sizeof(ULONG) * 3u + sizeof(USHORT)); }while (0)
typedef DECIMAL *LPDECIMAL;
typedef FLAGGED_WORD_BLOB *wireBSTR;
--- ../wine/include/wtypes.idl Mon Mar 17 00:54:18 2003
+++ include/wtypes.idl Fri May 16 16:22:10 2003
@@ -620,7 +620,7 @@
cpp_quote("} DECIMAL;")
cpp_quote("#endif")
cpp_quote("#define DECIMAL_NEG ((BYTE)0x80)")
-cpp_quote("#define DECIMAL_SETZERO(d) do{ memset(((char*)(d)) + sizeof(USHORT), 0, sizeof(ULONG) * 3u); }while (0)")
+cpp_quote("#define DECIMAL_SETZERO(d) do{ memset(((char*)(d)) + sizeof(USHORT), 0, sizeof(ULONG) * 3u + sizeof(USHORT)); }while (0)")
typedef DECIMAL *LPDECIMAL;
--- ../wine/dlls/oleaut32/variant.c Fri May 16 15:04:36 2003
+++ dlls/oleaut32/variant.c Fri May 16 16:15:51 2003
@@ -4593,12 +4593,9 @@
{ WCHAR *p=strIn;
ULONGLONG t;
ULONG cy;
-#ifdef FIXIT
+
DECIMAL_SETZERO(pdecOut);
-#else
- pdecOut->u.s.sign = pdecOut->u.s.scale = UI1_MIN;
- pdecOut->Hi32 = pdecOut->u1.s1.Mid32 = pdecOut->u1.s1.Lo32 = UI4_MIN;
-#endif
+
if(*p == (WCHAR)'-')pdecOut->u.s.sign= DECIMAL_NEG;
if((*p == (WCHAR)'-') || (*p == (WCHAR)'+')) p++;
for(;*p != (WCHAR)0; p++) {
@@ -4617,7 +4614,7 @@
pdecOut->Hi32 = (ULONG)(t & (ULONGLONG)UI4_MAX);
if(cy) goto overflow ;
}
- TRACE("(4) %s -> sign %02x,hi %08lx,mid %08lx, lo%08lx, scale %08x\n",
+ TRACE("%s -> sign %02x,hi %08lx,mid %08lx, lo%08lx, scale %08x\n",
debugstr_w(strIn),
pdecOut->u.s.sign, pdecOut->Hi32, pdecOut->u1.s1.Mid32,
pdecOut->u1.s1.Lo32, pdecOut->u.s.scale);