mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
comctl32/toolbar: When a null lParam is passed to TB_GETBUTTONTEXTA, we should not return -1 but the string size.
This commit is contained in:
parent
fcc9b57c7a
commit
585c3abb6b
1 changed files with 1 additions and 4 deletions
|
@ -3435,9 +3435,6 @@ TOOLBAR_GetButtonTextA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
INT nIndex;
|
||||
LPWSTR lpText;
|
||||
|
||||
if (lParam == 0)
|
||||
return -1;
|
||||
|
||||
nIndex = TOOLBAR_GetButtonIndex (infoPtr, (INT)wParam, FALSE);
|
||||
if (nIndex == -1)
|
||||
return -1;
|
||||
|
@ -3445,7 +3442,7 @@ TOOLBAR_GetButtonTextA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
lpText = TOOLBAR_GetText(infoPtr,&infoPtr->buttons[nIndex]);
|
||||
|
||||
return WideCharToMultiByte( CP_ACP, 0, lpText, -1,
|
||||
(LPSTR)lParam, 0x7fffffff, NULL, NULL ) - 1;
|
||||
(LPSTR)lParam, lParam ? 0x7fffffff : 0, NULL, NULL ) - 1;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue