From: Vadim Zeitlin Date: Thu, 2 Oct 2003 22:45:10 +0000 (+0000) Subject: fixed off by 1 in new GetRange() for wxTE_RICH2 controls X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/9ffa72272ba67827a83993b1e3ec8a312ec88434 fixed off by 1 in new GetRange() for wxTE_RICH2 controls git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24060 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index 76ab5d0d40..d577edd1a2 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -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) - str = str.Mid(from, to - from + 1); + str = str.Mid(from, to - from); } }