]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/stc.cpp
fix for calculating the header window height (patch 805791)
[wxWidgets.git] / src / stc / stc.cpp
index 274bce2f8159fa1afd5494206e5a26dab9dc02c3..974bbab8d3afd95614bab5552cdda93a60ba9a7c 100644 (file)
@@ -1121,7 +1121,7 @@ wxString wxStyledTextCtrl::GetSelectedText() {
          int   len  = end - start;
          if (!len) return wxEmptyString;
 
-         wxMemoryBuffer mbuf(len+1);
+         wxMemoryBuffer mbuf(len+2);
          char* buf = (char*)mbuf.GetWriteBuf(len+1);
          SendMsg(2161, 0, (long)buf);
          mbuf.UngetWriteBuf(len);