]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/textctrl.cpp
Only use unicode format when unicode support is enabled.
[wxWidgets.git] / src / msw / textctrl.cpp
index 76ab5d0d40f866c9595b0f4ed05523d8e9779a7d..d577edd1a2d5c31f310aa234d28ef3ed1ff0d16d 100644 (file)
@@ -567,7 +567,7 @@ wxString wxTextCtrl::GetRange(long from, long to) const
                     // this is easy in this case as EOL characters in richedit
                     // version > 1 are just '\r's and so positions map to
                     // string indices one to one (unlike with richedit 1)
                     // this is easy in this case as EOL characters in richedit
                     // version > 1 are just '\r's and so positions map to
                     // string indices one to one (unlike with richedit 1)
-                    str = str.Mid(from, to - from + 1);
+                    str = str.Mid(from, to - from);
                 }
             }
 
                 }
             }