Small toolbar fix

Francois Gouget fgouget at free.fr
Wed May 30 22:00:59 CDT 2001


   I believe this fixes a problem with Wordview95.


Changelog:

 * dlls/comctl32/toolbar.c

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

--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
  Good judgment comes from experience, and experience comes from bad judgment
                               -- Barry LePatner
-------------- next part --------------
Index: dlls/comctl32/toolbar.c
===================================================================
RCS file: /home/cvs/wine/wine/dlls/comctl32/toolbar.c,v
retrieving revision 1.83
diff -u -r1.83 toolbar.c
--- dlls/comctl32/toolbar.c	2001/02/28 05:31:02	1.83
+++ dlls/comctl32/toolbar.c	2001/05/30 19:46:10
@@ -2785,7 +2785,8 @@
        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;


More information about the wine-patches mailing list