iconv() really never set the trailing 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16578 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2002-08-17 19:36:07 +00:00
parent 832e44d38a
commit 7291c37aa8

View File

@ -723,6 +723,10 @@ size_t IC_CharSet::WC2MB(char *buf, const wchar_t *psz, size_t n)
cres = iconv( w2m, ICONV_CHAR_CAST(&psz), &inbuf, &buf, &outbuf );
res = n-outbuf;
// iconv() doesn't set the trailing zero, but moves buf to
// that position
buf[0] = 0;
}
else
{