From: Robin Dunn Date: Mon, 15 Mar 2004 22:43:30 +0000 (+0000) Subject: Use the length when converting X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4261ba88cfaf12f02e91082e20c8d4044b6cde0d Use the length when converting git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 99ce5a7a4c..46d478e701 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -1233,7 +1233,7 @@ wxString stc2wx(const char* str, size_t len) strncpy(buffer, str, len); buffer[len]=0; - wxString cstr(buffer, wxConvUTF8); + wxString cstr(buffer, wxConvUTF8, len); delete[] buffer; return cstr; diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 99ce5a7a4c..46d478e701 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -1233,7 +1233,7 @@ wxString stc2wx(const char* str, size_t len) strncpy(buffer, str, len); buffer[len]=0; - wxString cstr(buffer, wxConvUTF8); + wxString cstr(buffer, wxConvUTF8, len); delete[] buffer; return cstr;