]> git.saurik.com Git - wxWidgets.git/commitdiff
removed strcpy to fixed buffer (do it the right way: cf rev 1.54)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 13 Sep 2005 13:30:13 +0000 (13:30 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 13 Sep 2005 13:30:13 +0000 (13:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35482 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/strconv.cpp

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