]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/stc.cpp.in
wx/image.h is listed in wx/wx.h and part of PCH support
[wxWidgets.git] / src / stc / stc.cpp.in
index b99563feded2b5962193e8d9c7be766baeb3cfb9..2a9806a68a2adf03772aea3010017a41e22ce928 100644 (file)
@@ -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));
 }