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;