[PATCH 2/2] oleaut32: Just stop instead of erroring out on 8 or 9 in octal numbers.
Michael Stefaniuc
mstefani at redhat.de
Mon Jan 19 17:21:50 CST 2015
---
Lets see if this will get me on the wall of fame...
If the old behavior was real and if an app that somebody cares about
depends on that.
dlls/oleaut32/tests/vartest.c | 2 --
dlls/oleaut32/variant.c | 5 ++---
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/dlls/oleaut32/tests/vartest.c b/dlls/oleaut32/tests/vartest.c
index 118aa75..7ed4fd4 100644
--- a/dlls/oleaut32/tests/vartest.c
+++ b/dlls/oleaut32/tests/vartest.c
@@ -1383,11 +1383,9 @@ static void test_VarParseNumFromStr(void)
/* VB oct char bigger than 7 */
CONVERT("&o128", NUMPRS_HEX_OCT);
- todo_wine {
EXPECT(2,NUMPRS_HEX_OCT,0x40,4,3,0);
EXPECTRGB(0,1);
EXPECTRGB(1,2);
- }
EXPECTRGB(3,FAILDIG);
/** NUMPRS_PARENS **/
diff --git a/dlls/oleaut32/variant.c b/dlls/oleaut32/variant.c
index 5a28acc..feba6c5 100644
--- a/dlls/oleaut32/variant.c
+++ b/dlls/oleaut32/variant.c
@@ -1736,9 +1736,8 @@ HRESULT WINAPI VarParseNumFromStr(OLECHAR *lpszStr, LCID lcid, ULONG dwFlags,
}
else
{
- if ((dwState & B_PROCESSING_OCT) && ((*lpszStr == '8') || (*lpszStr == '9'))) {
- return DISP_E_TYPEMISMATCH;
- }
+ if ((dwState & B_PROCESSING_OCT) && ((*lpszStr == '8') || (*lpszStr == '9')))
+ break;
if (pNumprs->dwOutFlags & NUMPRS_DECIMAL)
pNumprs->nPwr10--; /* Count decimal points in nPwr10 */
--
1.8.3.1
More information about the wine-patches
mailing list