mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-02 20:18:28 +00:00
Corrected a potential crash.
This commit is contained in:
parent
7e85ea7c86
commit
c69c954783
1 changed files with 8 additions and 6 deletions
|
@ -1809,13 +1809,15 @@ TOOLBAR_GetButtonInfoA (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||
lpTbInfo->fsState = btnPtr->fsState;
|
||||
if (lpTbInfo->dwMask & TBIF_STYLE)
|
||||
lpTbInfo->fsStyle = btnPtr->fsStyle;
|
||||
if (lpTbInfo->dwMask & TBIF_TEXT) {
|
||||
if ((btnPtr->iString >= 0) || (btnPtr->iString < infoPtr->nNumStrings))
|
||||
lstrcpynWtoA (lpTbInfo->pszText,
|
||||
(LPWSTR)infoPtr->strings[btnPtr->iString],
|
||||
lpTbInfo->cchText);
|
||||
if (lpTbInfo->dwMask & TBIF_TEXT) {
|
||||
if ((btnPtr->iString >= 0) && (btnPtr->iString < infoPtr->nNumStrings))
|
||||
{
|
||||
lstrcpynWtoA (lpTbInfo->pszText,
|
||||
(LPWSTR)infoPtr->strings[btnPtr->iString],
|
||||
lpTbInfo->cchText);
|
||||
}
|
||||
else lpTbInfo->pszText[0]=0;
|
||||
}
|
||||
|
||||
return nIndex;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue