Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b4a73f74
Commit
b4a73f74
authored
Apr 06, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Apr 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix VarDateFromStr for the case of a trailing meridiem indicator.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2841a050
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
vartype.c
dlls/oleaut32/tests/vartype.c
+3
-0
vartype.c
dlls/oleaut32/vartype.c
+13
-6
No files found.
dlls/oleaut32/tests/vartype.c
View file @
b4a73f74
...
...
@@ -3528,6 +3528,9 @@ static void test_VarDateFromStr(void)
DFS
(
"1-2-1970"
);
EXPECT_DBL
(
25570
.
0
);
DFS
(
"13-1-1970"
);
EXPECT_DBL
(
25581
.
0
);
DFS
(
"1970-1-13"
);
EXPECT_DBL
(
25581
.
0
);
DFS
(
"6/30/2011 01:20:34"
);
EXPECT_DBL
(
40724
.
055
94907407
);
DFS
(
"6/30/2011 01:20:34 AM"
);
EXPECT_DBL
(
40724
.
055
94907407
);
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 non-english data string */
...
...
dlls/oleaut32/vartype.c
View file @
b4a73f74
...
...
@@ -7668,11 +7668,13 @@ HRESULT WINAPI VarDateFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, DATE* pd
/* Parse the string into our structure */
while
(
*
strIn
)
{
if
(
dp
.
dwCount
>=
6
)
break
;
if
(
isdigitW
(
*
strIn
))
{
if
(
dp
.
dwCount
>=
6
)
{
hRet
=
DISP_E_TYPEMISMATCH
;
break
;
}
dp
.
dwValues
[
dp
.
dwCount
]
=
strtoulW
(
strIn
,
&
strIn
,
10
);
dp
.
dwCount
++
;
strIn
--
;
...
...
@@ -7688,9 +7690,14 @@ HRESULT WINAPI VarDateFromStr(OLECHAR* strIn, LCID lcid, ULONG dwFlags, DATE* pd
{
if
(
i
<=
25
)
{
dp
.
dwValues
[
dp
.
dwCount
]
=
ParseDateMonths
[
i
];
dp
.
dwFlags
[
dp
.
dwCount
]
|=
(
DP_MONTH
|
DP_DATESEP
);
dp
.
dwCount
++
;
if
(
dp
.
dwCount
>=
6
)
hRet
=
DISP_E_TYPEMISMATCH
;
else
{
dp
.
dwValues
[
dp
.
dwCount
]
=
ParseDateMonths
[
i
];
dp
.
dwFlags
[
dp
.
dwCount
]
|=
(
DP_MONTH
|
DP_DATESEP
);
dp
.
dwCount
++
;
}
}
else
if
(
i
>
39
&&
i
<
42
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment