oleaut32: Fix localized date and time parsing.
authorAndré Hentschel <nerv@dawncrow.de>
Wed, 3 Mar 2010 18:59:16 +0000 (19:59 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 4 Mar 2010 11:28:33 +0000 (12:28 +0100)
dlls/oleaut32/tests/vartype.c
dlls/oleaut32/vartype.c

index 6742fce2168686ed809522d8c69887fbf80d29f5..79b6b9312fe945fc0aa4fdef570b3d04b0eb0f6a 100644 (file)
@@ -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)
index 580209b75392f9b8751654692e855823183690fd..da1288d4a7c4d98ca256d28f68783caa563e9a41 100644 (file)
@@ -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)))