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
06b99c62
Commit
06b99c62
authored
Aug 12, 2009
by
Rein Klazes
Committed by
Alexandre Julliard
Aug 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix a bug in computing the maximum depth of a branch in a menu hierarchy.
It was computing the number of submenus in the branch, rather then the maximum depth.
parent
32e35394
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
menu.c
dlls/user32/menu.c
+8
-4
No files found.
dlls/user32/menu.c
View file @
06b99c62
...
...
@@ -4646,18 +4646,22 @@ static int MENU_depth( POPUPMENU *pmenu, int depth)
{
int
i
;
MENUITEM
*
item
;
int
subdepth
;
depth
++
;
if
(
depth
>
MAXMENUDEPTH
)
return
depth
;
item
=
pmenu
->
items
;
for
(
i
=
0
;
i
<
pmenu
->
nItems
&&
depth
<=
MAXMENUDEPTH
;
i
++
,
item
++
){
POPUPMENU
*
psubmenu
=
MENU_GetMenu
(
item
->
hSubMenu
);
subdepth
=
depth
;
for
(
i
=
0
;
i
<
pmenu
->
nItems
&&
subdepth
<=
MAXMENUDEPTH
;
i
++
,
item
++
){
POPUPMENU
*
psubmenu
=
item
->
hSubMenu
?
MENU_GetMenu
(
item
->
hSubMenu
)
:
NULL
;
if
(
psubmenu
){
int
bdepth
=
MENU_depth
(
psubmenu
,
depth
);
if
(
bdepth
>
depth
)
depth
=
bdepth
;
if
(
bdepth
>
subdepth
)
sub
depth
=
bdepth
;
}
if
(
subdepth
>
MAXMENUDEPTH
)
TRACE
(
"<- hmenu %p
\n
"
,
item
->
hSubMenu
);
}
return
depth
;
return
sub
depth
;
}
...
...
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