From b412b3ccbe392725caa8b81b31b3ae2aa5d5377a Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 31 May 2001 21:33:55 +0000 Subject: [PATCH] TOOLBAR_InsertButtonA: If iString==-1 then don't use it as a pointer. --- dlls/comctl32/toolbar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index c6aaa88c1e8..9a44d3b5611 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -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;