From dc1e40c83fe45258f2f9aad74d2d714c79dbeee8 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 8 Aug 2003 11:54:26 +0000 Subject: [PATCH] don't ignore start parameter in find_last_of() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@22700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/common/string.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index afccb4dc70..e242e9e02f 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -186,6 +186,7 @@ All: - always NUL-terminate the log messages - wxRegEx::Compile() now calculates the number of groups correctly - wxHTTP::GetHeader() didn't find headers which not all in upper case +- wxString::find_last_of() ignored "start" parameter (Robert Vazan) All (GUI): diff --git a/src/common/string.cpp b/src/common/string.cpp index c05df8f997..38e26e586e 100644 --- a/src/common/string.cpp +++ b/src/common/string.cpp @@ -1620,7 +1620,7 @@ size_t wxString::find_last_of(const wxChar* sz, size_t nStart) const wxASSERT( nStart <= Len() ); } - for ( const wxChar *p = c_str() + length() - 1; p >= c_str(); p-- ) + for ( const wxChar *p = c_str() + nStart - 1; p >= c_str(); p-- ) { if ( wxStrchr(sz, *p) ) return p - c_str();