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
ff951dc8
Commit
ff951dc8
authored
Jul 12, 2023
by
Zhao Yi
Committed by
Alexandre Julliard
Jul 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32/syslink: Check item type before increasing link ID in SYSLINK_LinkAtPt().
Signed-off-by:
Zhaoyi
<
zhaoyi@uniontech.com
>
parent
53fd667e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
syslink.c
dlls/comctl32/syslink.c
+8
-6
syslink.c
dlls/comctl32/tests/syslink.c
+2
-2
No files found.
dlls/comctl32/syslink.c
View file @
ff951dc8
...
...
@@ -1320,16 +1320,18 @@ static PDOC_ITEM SYSLINK_LinkAtPt (const SYSLINK_INFO *infoPtr, const POINT *pt,
LIST_FOR_EACH_ENTRY
(
Current
,
&
infoPtr
->
Items
,
DOC_ITEM
,
entry
)
{
if
((
Current
->
Type
==
slLink
)
&&
SYSLINK_PtInDocItem
(
Current
,
*
pt
)
&&
(
!
MustBeEnabled
||
(
Current
->
u
.
Link
.
state
&
LIS_ENABLED
)))
if
(
Current
->
Type
==
slLink
)
{
if
(
LinkId
!=
NULL
)
if
(
SYSLINK_PtInDocItem
(
Current
,
*
pt
)
&&
(
!
MustBeEnabled
||
(
Current
->
u
.
Link
.
state
&
LIS_ENABLED
))
)
{
*
LinkId
=
id
;
if
(
LinkId
!=
NULL
)
{
*
LinkId
=
id
;
}
return
Current
;
}
return
Current
;
id
++
;
}
id
++
;
}
return
NULL
;
...
...
dlls/comctl32/tests/syslink.c
View file @
ff951dc8
...
...
@@ -264,13 +264,13 @@ static void test_link_id(void)
g_link_id
=
0
;
SendMessageA
(
hwnd
,
WM_LBUTTONDOWN
,
1
,
MAKELPARAM
(
50
,
10
));
SendMessageA
(
hwnd
,
WM_LBUTTONUP
,
0
,
MAKELPARAM
(
50
,
10
));
todo_wine
ok
(
g_link_id
==
0
,
"Got unexpected link id %d.
\n
"
,
g_link_id
);
ok
(
g_link_id
==
0
,
"Got unexpected link id %d.
\n
"
,
g_link_id
);
/* test link2 at (25, 25) */
g_link_id
=
0
;
SendMessageA
(
hwnd
,
WM_LBUTTONDOWN
,
1
,
MAKELPARAM
(
25
,
25
));
SendMessageA
(
hwnd
,
WM_LBUTTONUP
,
0
,
MAKELPARAM
(
25
,
25
));
todo_wine
ok
(
g_link_id
==
1
,
"Got unexpected link id %d.
\n
"
,
g_link_id
);
ok
(
g_link_id
==
1
,
"Got unexpected link id %d.
\n
"
,
g_link_id
);
DestroyWindow
(
hwnd
);
}
...
...
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