Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
23ff4761
Commit
23ff4761
authored
Feb 03, 2010
by
André Hentschel
Committed by
Alexandre Julliard
Feb 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleaut32: Fix year 0.
parent
ac1ca87b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
vartest.c
dlls/oleaut32/tests/vartest.c
+1
-1
variant.c
dlls/oleaut32/variant.c
+2
-2
No files found.
dlls/oleaut32/tests/vartest.c
View file @
23ff4761
...
...
@@ -1665,7 +1665,7 @@ static void test_VarDateFromUdate(void)
UD2T
(
1
,
12001
,
-
1020
,
18
,
1
,
16
,
0
,
0
,
0
,
0
,
S_OK
,
29221
.
75087962963
);
/* Test rolled year and month */
UD2T
(
1
,
-
23
,
1982
,
18
,
1
,
16
,
0
,
0
,
0
,
0
,
S_OK
,
29221
.
75087962963
);
/* Test backrolled month */
UD2T
(
-
59
,
3
,
1980
,
18
,
1
,
16
,
0
,
0
,
0
,
0
,
S_OK
,
29221
.
75087962963
);
/* Test backrolled days */
todo_wine
UD2T
(
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
S_OK
,
36526
);
/* Test zero year */
UD2T
(
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
S_OK
,
36526
);
/* Test zero year */
UD2T
(
0
,
0
,
1980
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
S_OK
,
29189
);
/* Test zero day and month */
UD2T
(
0
,
1
,
1980
,
0
,
0
,
0
,
0
,
2
,
1
,
0
,
S_OK
,
29220
.
0
);
/* Test zero day = LastDayOfMonth */
UD2T
(
-
1
,
1
,
1980
,
18
,
1
,
16
,
0
,
0
,
0
,
0
,
S_OK
,
29219
.
75087962963
);
/* Test day -1 = LastDayOfMonth - 1 */
...
...
dlls/oleaut32/variant.c
View file @
23ff4761
...
...
@@ -1145,7 +1145,7 @@ static HRESULT VARIANT_RollUdate(UDATE *lpUd)
if
(
iYear
>
9999
||
iYear
<
-
9999
)
return
E_INVALIDARG
;
/* Invalid value */
/* Years < 100 are treated as 1900 + year */
if
(
iYear
>
=
0
&&
iYear
<
100
)
if
(
iYear
>
0
&&
iYear
<
100
)
iYear
+=
1900
;
iMinute
+=
(
iSecond
-
(
iSecond
%
60
))
/
60
;
...
...
@@ -1180,7 +1180,7 @@ static HRESULT VARIANT_RollUdate(UDATE *lpUd)
if
(
iSecond
<
0
){
iSecond
+=
60
;
iMinute
--
;}
if
(
iMinute
<
0
){
iMinute
+=
60
;
iHour
--
;}
if
(
iHour
<
0
)
{
iHour
+=
24
;
iDay
--
;}
if
(
iYear
<
0
)
iYear
+=
2000
;
if
(
iYear
<
=
0
)
iYear
+=
2000
;
lpUd
->
st
.
wYear
=
iYear
;
lpUd
->
st
.
wMonth
=
iMonth
;
...
...
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