X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e9bafca0f56de34638d4c3fef8cf74fe9351193..c348a710f06d6168c64434b776df94e532d7eea7:/src/stc/stc.cpp.in diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index b99563fede..2a9806a68a 100644 --- a/src/stc/stc.cpp.in +++ b/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)); }