]> git.saurik.com Git - wxWidgets.git/blobdiff - src/stc/PlatWX.cpp
SetSizeHints hacks are not needed any longer since the minsize is not
[wxWidgets.git] / src / stc / PlatWX.cpp
index 43b6a2a44335c02ad2a0fe6cdde33a0fba72162f..d1e45d45fb7d9395298550ca5be0129e8b90e2df 100644 (file)
@@ -1251,6 +1251,10 @@ double ElapsedTime::Duration(bool reset) {
 #if wxUSE_UNICODE
 wxString stc2wx(const char* str, size_t len)
 {
+    if (str[len] == 0)
+        // It's already terminated correctly.
+        return wxString(str, wxConvUTF8, len);
+
     char *buffer=new char[len+1];
     strncpy(buffer, str, len);
     buffer[len]=0;