John Fremlin : oleau32: Stop incorrectly parsing dates in bogus YDM order in European locales.
Alexandre Julliard
julliard at winehq.org
Tue Apr 26 11:35:45 CDT 2011
Module: wine
Branch: master
Commit: 66c42df02ec0cc30b54138f1d56dafcfbc7171a4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=66c42df02ec0cc30b54138f1d56dafcfbc7171a4
Author: John Fremlin <john at fremlin.org>
Date: Mon Apr 25 17:29:42 2011 +0000
oleau32: Stop incorrectly parsing dates in bogus YDM order in European locales.
---
dlls/oleaut32/tests/vartype.c | 3 +++
dlls/oleaut32/vartype.c | 2 +-
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/oleaut32/tests/vartype.c b/dlls/oleaut32/tests/vartype.c
index 2026cce..99df002 100644
--- a/dlls/oleaut32/tests/vartype.c
+++ b/dlls/oleaut32/tests/vartype.c
@@ -3458,6 +3458,9 @@ static void test_VarDateFromStr(void)
DFS("02.01.1970"); EXPECT_DBL(25570.0);
DFS("02.13.1970"); EXPECT_DBL(25612.0);
DFS("02-13-1970"); EXPECT_DBL(25612.0);
+ DFS("2020-01-11"); EXPECT_DBL(43841.0);
+ DFS("2173-10-14"); EXPECT_DBL(100000.0);
+
DFS("02.01.1970 00:00:00"); EXPECT_DBL(25570.0);
lcid = MAKELCID(MAKELANGID(LANG_SPANISH,SUBLANG_SPANISH),SORT_DEFAULT);
DFS("02.01.1970"); EXPECT_MISMATCH;
diff --git a/dlls/oleaut32/vartype.c b/dlls/oleaut32/vartype.c
index 8f54eae..2d4d4e3 100644
--- a/dlls/oleaut32/vartype.c
+++ b/dlls/oleaut32/vartype.c
@@ -7282,7 +7282,7 @@ VARIANT_MakeDate_Start:
switch (iDate)
{
case 0: dwTry = dwAllOrders & ~(ORDER_DMY|ORDER_YDM); break;
- case 1: dwTry = dwAllOrders & ~(ORDER_MDY|ORDER_YMD|ORDER_MYD); break;
+ case 1: dwTry = dwAllOrders & ~(ORDER_MDY|ORDER_YDM|ORDER_MYD); break;
default: dwTry = dwAllOrders & ~(ORDER_DMY|ORDER_YDM); break;
}
}
More information about the wine-cvs
mailing list