fix wxMBConv_iconv to respect the base class conventions: when the input is NUL-terminated, the output should be NUL-terminated and the return value should account for the terminating NUL

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-05-31 01:39:32 +00:00
parent 467a2982d2
commit d50c083157

View File

@@ -2082,6 +2082,11 @@ wxMBConv_iconv::ToWChar(wchar_t *dst, size_t dstLen,
srcLen = p - src;
break;
}
// when we're determining the length of the string ourselves we count
// the terminating NUL(s) as part of it and always NUL-terminate the
// output
srcLen += nulLen;
}
// we express length in the number of (wide) characters but iconv always