[2/2] oleaut32: Fix lokalized date and time parsing

André Hentschel nerv at dawncrow.de
Wed Mar 3 12:59:16 CST 2010


..."fall through" comment copied from above, so it fits in the files design
---
 dlls/oleaut32/tests/vartype.c |    2 +-
 dlls/oleaut32/vartype.c       |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c
index 6742fce..79b6b93 100644
--- a/dlls/oleaut32/tests/vartype.c
+++ b/dlls/oleaut32/tests/vartype.c
@@ -3439,7 +3439,7 @@ static void test_VarDateFromStr(void)
   DFS("02.01.1970 00:00:00"); EXPECT_MISMATCH;
   lcid = MAKELCID(MAKELANGID(LANG_GERMAN,SUBLANG_GERMAN),SORT_DEFAULT);
   DFS("02.01.1970"); EXPECT_DBL(25570.0);
-  DFS("02.01.1970 00:00:00"); todo_wine EXPECT_DBL(25570.0);
+  DFS("02.01.1970 00:00:00"); EXPECT_DBL(25570.0);
 }
 
 static void test_VarDateCopy(void)
diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c
index 580209b..da1288d 100644
--- a/dlls/oleaut32/vartype.c
+++ b/dlls/oleaut32/vartype.c
@@ -7707,6 +7707,13 @@ HRESULT WINAPI VarDateFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, DATE* pd
       dp.dwCount -= 3;
       break;
 
+    case 0x1B: /* localized DDDTTT */
+      if (!iDate)
+        {
+          hRet = DISP_E_TYPEMISMATCH;
+          break;
+        }
+      /* .. fall through .. */
     case 0x18: /* DDDTTT */
       if ((dp.dwFlags[0] & (DP_AM|DP_PM)) || (dp.dwFlags[1] & (DP_AM|DP_PM)) ||
           (dp.dwFlags[2] & (DP_AM|DP_PM)))
-- 

Best Regards, André Hentschel



More information about the wine-patches mailing list