Module: wine Branch: master Commit: 585c3abb6b9ab2ab558e6c963e7fb0cbf339ede2 URL: http://source.winehq.org/git/wine.git/?a=commit;h=585c3abb6b9ab2ab558e6c963e...
Author: Giuseppe Bilotta giuseppe.bilotta@gmail.com Date: Thu May 7 11:13:16 2009 +0200
comctl32/toolbar: When a null lParam is passed to TB_GETBUTTONTEXTA, we should not return -1 but the string size.
---
dlls/comctl32/toolbar.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index c5aa8f4..867bac8 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -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; }