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
78a4bad8
Commit
78a4bad8
authored
Jul 22, 2023
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u/tests: Fully initialize lparam_buffer before each test.
parent
271feee4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
10 deletions
+18
-10
win32u.c
dlls/win32u/tests/win32u.c
+18
-10
No files found.
dlls/win32u/tests/win32u.c
View file @
78a4bad8
...
...
@@ -1533,6 +1533,8 @@ static void test_msg_output( const struct lparam_hook_test *test, LRESULT result
else
expected
=
test
->
lparam
;
if
(
expected
)
todo_wine_if
((
test
->
message
==
CB_GETLBTEXT
&&
test
->
msg_result
==
7
)
||
(
test
->
message
==
LB_GETTEXT
&&
test
->
msg_result
==
7
))
ok
(
!
memcmp
(
lparam_buffer
,
expected
,
test
->
lparam_size
),
"unexpected lparam content
\n
"
);
todo_wine_if
(
test
->
todo
)
...
...
@@ -1578,8 +1580,13 @@ static void init_hook_test( const struct lparam_hook_test *test )
retwnd_hook_lparam
=
0
;
retwnd_hook_lparam2
=
0
;
if
(
test
->
lparam_size
&&
test
->
lparam
)
memcpy
(
lparam_buffer
,
test
->
lparam
,
test
->
lparam_size
);
if
(
test
->
lparam_size
)
{
if
(
test
->
lparam
)
memcpy
(
lparam_buffer
,
test
->
lparam
,
test
->
lparam_size
);
else
memset
(
lparam_buffer
,
0xcc
,
test
->
lparam_size
);
}
}
static
void
test_wndproc_hook
(
void
)
...
...
@@ -1593,8 +1600,9 @@ static void test_wndproc_hook(void)
static
const
BOOL
false_lparam
=
FALSE
;
static
const
WCHAR
strbufW
[
8
]
=
L"abc
\0
defg"
;
static
const
WCHAR
strbuf2W
[
8
]
=
L"
\0
bc
\0
defg
"
;
static
const
WCHAR
strbuf2W
[
8
]
=
L"
\0
\xcccc\xcccc\xcccc\xcccc\xcccc\xcccc\xcccc
"
;
static
const
WCHAR
strbuf3W
[
8
]
=
L"abcdefgh"
;
static
const
WCHAR
strbuf4W
[
8
]
=
L"abc
\0\xcccc\xcccc\xcccc\xcccc
"
;
static
const
RECT
rect_in
=
{
1
,
2
,
100
,
200
};
static
const
RECT
rect_out
=
{
3
,
4
,
110
,
220
};
...
...
@@ -1628,27 +1636,27 @@ static void test_wndproc_hook(void)
},
{
"WM_GETTEXT2"
,
WM_GETTEXT
,
.
wparam
=
8
,
.
msg_result
=
1
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbufW
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbuf
4
W
,
},
{
"WM_GETTEXT3"
,
WM_GETTEXT
,
.
wparam
=
8
,
.
msg_result
=
9
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbufW
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbuf
4
W
,
},
{
"WM_ASKCBFORMATNAME"
,
WM_ASKCBFORMATNAME
,
.
wparam
=
8
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbufW
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbuf
4
W
,
},
{
"WM_ASKCBFORMATNAME2"
,
WM_ASKCBFORMATNAME
,
.
wparam
=
8
,
.
msg_result
=
1
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbufW
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbuf
4
W
,
},
{
"WM_ASKCBFORMATNAME3"
,
WM_ASKCBFORMATNAME
,
.
wparam
=
8
,
.
msg_result
=
9
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbufW
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbuf
4
W
,
},
{
"CB_GETLBTEXT"
,
CB_GETLBTEXT
,
.
msg_result
=
7
,
.
check_result
=
4
,
.
todo_result
=
TRUE
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbufW
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbuf
4
W
,
.
todo
=
TRUE
},
{
...
...
@@ -1663,7 +1671,7 @@ static void test_wndproc_hook(void)
},
{
"LB_GETTEXT"
,
LB_GETTEXT
,
.
msg_result
=
7
,
.
check_result
=
4
,
.
todo_result
=
TRUE
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbufW
,
.
lparam_size
=
sizeof
(
strbufW
),
.
change_lparam
=
strbufW
,
.
check_lparam
=
strbuf
4
W
,
.
todo
=
TRUE
},
{
...
...
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