X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e9bafca0f56de34638d4c3fef8cf74fe9351193..f5766910b6731eb03e82371416e9778203396ce7:/contrib/src/stc/stc.cpp.in?ds=inline diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index b99563fede..2a9806a68a 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -854,12 +854,7 @@ static void SetEventText(wxStyledTextEvent& evt, const char* text, size_t length) { if(!text) return; - // The unicode conversion MUST have a null byte to terminate the - // string so move it into a buffer first and give it one. - wxMemoryBuffer buf(length+1); - buf.AppendData((void*)text, length); - buf.AppendByte(0); - evt.SetText(stc2wx(buf)); + evt.SetText(stc2wx(text, length)); }