]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/stc/PlatWX.cpp
removed enum that was causing more problems than it was worth
[wxWidgets.git] / contrib / src / stc / PlatWX.cpp
index d1e45d45fb7d9395298550ca5be0129e8b90e2df..b20f68fa34ca18f7c1315d2b886a0b18d5ae91f6 100644 (file)
@@ -1251,7 +1251,11 @@ double ElapsedTime::Duration(bool reset) {
 #if wxUSE_UNICODE
 wxString stc2wx(const char* str, size_t len)
 {
-    if (str[len] == 0)
+    // note: we assume that str is of length len not including the terminating null.
+
+    if (!len)
+        return wxEmptyString;
+    else if (str[len-1] == 0)
         // It's already terminated correctly.
         return wxString(str, wxConvUTF8, len);