Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9e82510e
Commit
9e82510e
authored
Jun 13, 2002
by
François Gouget
Committed by
Alexandre Julliard
Jun 13, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of strings that do not finish with "||".
Fix the indentation of the while loop in TOOLBAR_AddStringW.
parent
29853a90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
24 deletions
+34
-24
toolbar.c
dlls/comctl32/toolbar.c
+34
-24
No files found.
dlls/comctl32/toolbar.c
View file @
9e82510e
...
@@ -2477,31 +2477,38 @@ TOOLBAR_AddStringW (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -2477,31 +2477,38 @@ TOOLBAR_AddStringW (HWND hwnd, WPARAM wParam, LPARAM lParam)
{
{
PWSTR
p
=
szString
+
1
;
PWSTR
p
=
szString
+
1
;
nIndex
=
infoPtr
->
nNumStrings
;
nIndex
=
infoPtr
->
nNumStrings
;
while
(
*
p
!=
L'|'
)
{
while
(
*
p
!=
L'|'
&&
*
p
!=
L'\0'
)
{
PWSTR
np
;
if
(
infoPtr
->
nNumStrings
==
0
)
{
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
LPWSTR
));
}
else
{
LPWSTR
*
oldStrings
=
infoPtr
->
strings
;
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
LPWSTR
)
*
(
infoPtr
->
nNumStrings
+
1
));
memcpy
(
&
infoPtr
->
strings
[
0
],
&
oldStrings
[
0
],
sizeof
(
LPWSTR
)
*
infoPtr
->
nNumStrings
);
COMCTL32_Free
(
oldStrings
);
}
len
=
COMCTL32_StrChrW
(
p
,
L'|'
)
-
p
;
TRACE
(
"len=%d %s
\n
"
,
len
,
debugstr_w
(
p
));
infoPtr
->
strings
[
infoPtr
->
nNumStrings
]
=
COMCTL32_Alloc
(
sizeof
(
WCHAR
)
*
(
len
+
1
));
lstrcpynW
(
infoPtr
->
strings
[
infoPtr
->
nNumStrings
],
p
,
len
+
1
);
infoPtr
->
nNumStrings
++
;
p
+=
(
len
+
1
);
if
(
infoPtr
->
nNumStrings
==
0
)
{
}
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
LPWSTR
));
}
else
{
LPWSTR
*
oldStrings
=
infoPtr
->
strings
;
infoPtr
->
strings
=
COMCTL32_Alloc
(
sizeof
(
LPWSTR
)
*
(
infoPtr
->
nNumStrings
+
1
));
memcpy
(
&
infoPtr
->
strings
[
0
],
&
oldStrings
[
0
],
sizeof
(
LPWSTR
)
*
infoPtr
->
nNumStrings
);
COMCTL32_Free
(
oldStrings
);
}
np
=
COMCTL32_StrChrW
(
p
,
L'|'
);
if
(
np
!=
NULL
)
{
len
=
np
-
p
;
np
++
;
}
else
{
len
=
strlenW
(
p
);
np
=
p
+
len
;
}
TRACE
(
"len=%d %s
\n
"
,
len
,
debugstr_w
(
p
));
infoPtr
->
strings
[
infoPtr
->
nNumStrings
]
=
COMCTL32_Alloc
(
sizeof
(
WCHAR
)
*
(
len
+
1
));
lstrcpynW
(
infoPtr
->
strings
[
infoPtr
->
nNumStrings
],
p
,
len
+
1
);
infoPtr
->
nNumStrings
++
;
p
=
np
;
}
}
}
else
else
{
{
...
@@ -2983,6 +2990,9 @@ TOOLBAR_GetButtonInfoW (HWND hwnd, WPARAM wParam, LPARAM lParam)
...
@@ -2983,6 +2990,9 @@ TOOLBAR_GetButtonInfoW (HWND hwnd, WPARAM wParam, LPARAM lParam)
btnPtr
=
&
infoPtr
->
buttons
[
nIndex
];
btnPtr
=
&
infoPtr
->
buttons
[
nIndex
];
if
(
!
btnPtr
)
return
-
1
;
if
(
lpTbInfo
->
dwMask
&
TBIF_COMMAND
)
if
(
lpTbInfo
->
dwMask
&
TBIF_COMMAND
)
lpTbInfo
->
idCommand
=
btnPtr
->
idCommand
;
lpTbInfo
->
idCommand
=
btnPtr
->
idCommand
;
if
(
lpTbInfo
->
dwMask
&
TBIF_IMAGE
)
if
(
lpTbInfo
->
dwMask
&
TBIF_IMAGE
)
...
...
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