mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-11-16 07:48:07 +01:00
add assertion on null string
This commit is contained in:
parent
bc3515272c
commit
d6fac2014e
1 changed files with 5 additions and 1 deletions
|
@ -25,7 +25,11 @@ void
|
||||||
ceSetDlgItemText( HWND hDlg, XP_U16 id, XP_UCHAR* buf )
|
ceSetDlgItemText( HWND hDlg, XP_U16 id, XP_UCHAR* buf )
|
||||||
{
|
{
|
||||||
wchar_t widebuf[BUF_SIZE];
|
wchar_t widebuf[BUF_SIZE];
|
||||||
XP_U16 len = (XP_U16)XP_STRLEN( buf );
|
XP_U16 len;
|
||||||
|
|
||||||
|
XP_ASSERT( buf != NULL );
|
||||||
|
|
||||||
|
len = (XP_U16)XP_STRLEN( buf );
|
||||||
|
|
||||||
if ( len >= BUF_SIZE ) {
|
if ( len >= BUF_SIZE ) {
|
||||||
len = BUF_SIZE - 1;
|
len = BUF_SIZE - 1;
|
||||||
|
|
Loading…
Reference in a new issue