oleaut32:VarParseNumFromStr
Walt Ogburn
reuben at ugcs.caltech.edu
Thu Oct 7 12:59:10 CDT 2004
This patch allows exponents of zero (like "1.000E0") to parse correctly.
Previously, they caused DISP_E_TYPEMISMATCH.
Check for "No exponent digits" before stripping leading zeros, instead of
after, because an exponent consisting of all zeros should be valid.
I hope this is the right way and the right place to post this...
Thanks,
Walter
=========================================================================
diff -urN wine.orig/dlls/oleaut32/variant.c wine/dlls/oleaut32/variant.c
--- wine.orig/dlls/oleaut32/variant.c 2004-10-07 01:48:44.093566000
-0700
+++ wine/dlls/oleaut32/variant.c 2004-10-07 01:51:41.061663656
-0700
@@ -1668,14 +1668,14 @@
int exponentSize = 0;
if (dwState & B_EXPONENT_START)
{
+ if (!isdigitW(*lpszStr))
+ break; /* No exponent digits - invalid */
while (*lpszStr == '0')
{
/* Skip leading zero's in the exponent */
cchUsed++;
lpszStr++;
}
- if (!isdigitW(*lpszStr))
- break; /* No exponent digits - invalid */
}
while (isdigitW(*lpszStr))
==========================================================================
More information about the wine-patches
mailing list