add assertion on null string

This commit is contained in:
ehouse 2005-07-23 15:16:26 +00:00
parent bc3515272c
commit d6fac2014e

View file

@ -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;