Mercurial > dwindows
diff os2/dw.c @ 1397:2ccf7eacedf5
Safety checks in dw_bitmapbutton_new*() on Windows and OS/2.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 27 Nov 2011 11:01:01 +0000 |
parents | e0a66f06501c |
children | 152e3c8916de |
line wrap: on
line diff
--- a/os2/dw.c Sun Nov 27 10:54:08 2011 +0000 +++ b/os2/dw.c Sun Nov 27 11:01:01 2011 +0000 @@ -5714,7 +5714,8 @@ NULL, NULL); - strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); + if(text) + strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); blah->oldproc = WinSubclassWindow(tmp, _BtProc); WinSetWindowPtr(tmp, QWP_USER, blah); @@ -5811,7 +5812,8 @@ } } - strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); + if(text) + strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); blah->oldproc = WinSubclassWindow(tmp, _BtProc); WinSetWindowPtr(tmp, QWP_USER, blah); @@ -5909,7 +5911,8 @@ } } - strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); + if(text) + strncpy(blah->bubbletext, text, BUBBLE_HELP_MAX - 1); blah->oldproc = WinSubclassWindow(tmp, _BtProc); WinSetWindowPtr(tmp, QWP_USER, blah);