TOOLBAR_InsertButtonA: If iString==-1 then don't use it as a pointer.

This commit is contained in:
Francois Gouget 2001-05-31 21:33:55 +00:00 committed by Alexandre Julliard
parent b6dc0940c2
commit b412b3ccbe
1 changed files with 2 additions and 1 deletions

View File

@ -2785,7 +2785,8 @@ TOOLBAR_InsertButtonA (HWND hwnd, WPARAM wParam, LPARAM lParam)
int len;
LPSTR ptr;
if(lpTbb->iString) {
/* FIXME: iString == -1 is undocumented */
if(lpTbb->iString && lpTbb->iString!=-1) {
len = strlen((char*)lpTbb->iString) + 2;
ptr = COMCTL32_Alloc(len);
nIndex = infoPtr->nNumButtons;