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
385b8dcb
Commit
385b8dcb
authored
Dec 29, 2009
by
Nikolay Sivov
Committed by
Alexandre Julliard
Dec 30, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/sysparams: Return NULL from GetSysColorBrush() for invalid index.
parent
697955c9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
sysparams.c
dlls/user32/sysparams.c
+1
-1
sysparams.c
dlls/user32/tests/sysparams.c
+2
-2
No files found.
dlls/user32/sysparams.c
View file @
385b8dcb
...
...
@@ -3028,7 +3028,7 @@ HBRUSH WINAPI GetSysColorBrush( INT index )
{
if
(
0
<=
index
&&
index
<
NUM_SYS_COLORS
)
return
SysColorBrushes
[
index
];
WARN
(
"Unknown index(%d)
\n
"
,
index
);
return
GetStockObject
(
LTGRAY_BRUSH
)
;
return
NULL
;
}
...
...
dlls/user32/tests/sysparams.c
View file @
385b8dcb
...
...
@@ -2770,7 +2770,7 @@ static void test_GetSysColorBrush(void)
SetLastError
(
0xdeadbeef
);
hbr
=
GetSysColorBrush
(
-
1
);
todo_wine
ok
(
hbr
==
NULL
,
"Expected NULL brush
\n
"
);
ok
(
hbr
==
NULL
,
"Expected NULL brush
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected last error not set, got %x
\n
"
,
GetLastError
());
/* greater than max index */
hbr
=
GetSysColorBrush
(
COLOR_MENUBAR
);
...
...
@@ -2778,7 +2778,7 @@ static void test_GetSysColorBrush(void)
{
SetLastError
(
0xdeadbeef
);
hbr
=
GetSysColorBrush
(
COLOR_MENUBAR
+
1
);
todo_wine
ok
(
hbr
==
NULL
,
"Expected NULL brush
\n
"
);
ok
(
hbr
==
NULL
,
"Expected NULL brush
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected last error not set, got %x
\n
"
,
GetLastError
());
}
else
...
...
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