removed strcpy to fixed buffer (do it the right way: cf rev 1.54)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-09-13 13:30:13 +00:00
parent 451f6363c9
commit 0331b385a8

View File

@@ -1363,10 +1363,9 @@ bool wxMBConv_iconv::ms_wcNeedsSwap = false;
wxMBConv_iconv::wxMBConv_iconv(const wxChar *name) wxMBConv_iconv::wxMBConv_iconv(const wxChar *name)
{ {
// Do it the hard way // iconv operates with chars, not wxChars, but luckily it uses only ASCII
char cname[100]; // names for the charsets
for (size_t i = 0; i < wxStrlen(name)+1; i++) const wxString cname = wxString::ToAscii(name);
cname[i] = (char) name[i];
// check for charset that represents wchar_t: // check for charset that represents wchar_t:
if (ms_wcCharsetName == NULL) if (ms_wcCharsetName == NULL)