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
7f5c9769
Commit
7f5c9769
authored
Mar 11, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Fix TB_GETSTRING return values.
parent
375f60b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
toolbar.c
dlls/comctl32/tests/toolbar.c
+4
-4
toolbar.c
dlls/comctl32/toolbar.c
+3
-1
No files found.
dlls/comctl32/tests/toolbar.c
View file @
7f5c9769
...
...
@@ -1109,14 +1109,14 @@ static void test_getstring(void)
r
=
SendMessage
(
hToolbar
,
TB_ADDSTRING
,
0
,
(
LPARAM
)
answer
);
expect
(
0
,
r
);
r
=
SendMessage
(
hToolbar
,
TB_GETSTRING
,
MAKEWPARAM
(
0
,
0
),
(
LPARAM
)
NULL
);
todo_wine
expect
(
strlen
(
answer
),
r
);
expect
(
strlen
(
answer
),
r
);
r
=
SendMessage
(
hToolbar
,
TB_GETSTRINGW
,
MAKEWPARAM
(
0
,
0
),
(
LPARAM
)
NULL
);
todo_wine
expect
(
strlen
(
answer
),
r
);
expect
(
strlen
(
answer
),
r
);
r
=
SendMessage
(
hToolbar
,
TB_GETSTRING
,
MAKEWPARAM
(
sizeof
(
str
),
0
),
(
LPARAM
)
str
);
todo_wine
expect
(
strlen
(
answer
),
r
);
expect
(
strlen
(
answer
),
r
);
expect
(
0
,
lstrcmp
(
answer
,
str
));
r
=
SendMessage
(
hToolbar
,
TB_GETSTRINGW
,
MAKEWPARAM
(
sizeof
(
strW
),
0
),
(
LPARAM
)
strW
);
todo_wine
expect
(
strlen
(
answer
),
r
);
expect
(
strlen
(
answer
),
r
);
expect
(
0
,
lstrcmpW
(
answerW
,
strW
));
DestroyWindow
(
hToolbar
);
...
...
dlls/comctl32/toolbar.c
View file @
7f5c9769
...
...
@@ -5186,6 +5186,7 @@ TOOLBAR_GetStringA (HWND hwnd, WPARAM wParam, LPARAM lParam)
if
(
iString
<
infoPtr
->
nNumStrings
)
{
ret
=
WideCharToMultiByte
(
CP_ACP
,
0
,
infoPtr
->
strings
[
iString
],
-
1
,
str
,
buffersize
,
NULL
,
NULL
);
ret
--
;
TRACE
(
"returning %s
\n
"
,
debugstr_a
(
str
));
}
...
...
@@ -5216,11 +5217,12 @@ TOOLBAR_GetStringW (HWND hwnd, WPARAM wParam, LPARAM lParam)
memcpy
(
str
,
infoPtr
->
strings
[
iString
],
ret
);
str
[
len
]
=
'\0'
;
}
ret
=
len
;
TRACE
(
"returning %s
\n
"
,
debugstr_w
(
str
));
}
else
ERR
(
"String index %d out of range (largest is %d)
\n
"
,
iString
,
infoPtr
->
nNumStrings
-
1
);
WARN
(
"String index %d out of range (largest is %d)
\n
"
,
iString
,
infoPtr
->
nNumStrings
-
1
);
return
ret
;
}
...
...
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