Module: wine Branch: master Commit: efc86ec175fa2f67c649299f48ac96d1af9a1fa9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=efc86ec175fa2f67c649299f48...
Author: Akihiro Sagawa sagawa.aki@gmail.com Date: Wed May 17 00:00:07 2017 +0900
oleaut32: Fix parse error when converting non-ascii string to VT_DATE.
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/oleaut32/tests/vartype.c | 7 +++++++ dlls/oleaut32/vartype.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c index ff495bd..0f39043 100644 --- a/dlls/oleaut32/tests/vartype.c +++ b/dlls/oleaut32/tests/vartype.c @@ -3410,6 +3410,8 @@ static void test_VarDateFromStr(void) SYSTEMTIME st; OLECHAR buff[128]; size_t i; + OLECHAR with_ideographic_spaceW[] = { '6','/','3','0','/','2','0','1','1',0x3000, + '1',':','2','0',':','3','4',0 };
lcid = MAKELCID(MAKELANGID(LANG_ENGLISH,SUBLANG_ENGLISH_US),SORT_DEFAULT);
@@ -3533,6 +3535,11 @@ static void test_VarDateFromStr(void) DFS("6/30/2011 01:20:34 PM"); EXPECT_DBL(40724.55594907407); /* Native fails "1999 January 3, 9AM". I consider that a bug in native */
+ /* test a data with ideographic space */ + out = 0.0; + hres = pVarDateFromStr(with_ideographic_spaceW, lcid, LOCALE_NOUSEROVERRIDE, &out); + EXPECT_DBL(40724.05594907407); + /* test a non-english data string */ DFS("02.01.1970"); EXPECT_MISMATCH; DFS("02.01.1970 00:00:00"); EXPECT_MISMATCH; diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c index 2151fc9..aab4d33 100644 --- a/dlls/oleaut32/vartype.c +++ b/dlls/oleaut32/vartype.c @@ -7676,7 +7676,7 @@ HRESULT WINAPI VarDateFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, DATE* pd dp.dwCount++; strIn--; } - else if (isalpha(*strIn)) + else if (isalphaW(*strIn)) { BOOL bFound = FALSE;