]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/string.cpp
Added wxRTTI for the new wxVScrolledWindow, wxVListBox, and
[wxWidgets.git] / src / common / string.cpp
index f02faad0daf1418a207fb04c078812b530b986cd..e15d84319d6e9c736d446b2c6222d9bff6389f89 100644 (file)
@@ -536,10 +536,11 @@ size_t wxStringBase::find_last_of(const wxChar* sz, size_t nStart) const
     }
     else
     {
-        wxASSERT( nStart <= length() );
+        wxASSERT_MSG( nStart <= length(),
+                        _T("invalid index in find_last_of()") );
     }
 
-    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();