Put terminating NUL in the buffer since MB2WC doesn't do it. [#749825]
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -267,6 +267,7 @@ wxString::wxString(const char *psz, wxMBConv& conv, size_t nLength)
|
||||
if ( conv.MB2WC(m_pchData, psz, nLen + 1) != (size_t)-1 )
|
||||
{
|
||||
// initialized ok
|
||||
m_pchData[nLen] = 0;
|
||||
return;
|
||||
}
|
||||
//else: the conversion failed -- leave the string empty (what else?)
|
||||
|
Reference in New Issue
Block a user