From f06a1f33f13bd2c33a94701ca38f1c0053bae3b7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sat, 11 Aug 2007 19:17:14 +0000 Subject: [PATCH] fixed wxStringTokenizer to correctly handle wxTOKEN_RET_DELIMS after the recent change to use iterators git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48027 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/tokenzr.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/tokenzr.cpp b/src/common/tokenzr.cpp index 12aa6c2e1d..8c29cd7cfa 100644 --- a/src/common/tokenzr.cpp +++ b/src/common/tokenzr.cpp @@ -260,10 +260,11 @@ wxString wxStringTokenizer::GetNextToken() { // in wxTOKEN_RET_DELIMS mode we return the delimiter character // with token, otherwise leave it out + wxString::const_iterator tokenEnd(pos); if ( m_mode == wxTOKEN_RET_DELIMS ) - ++pos; + ++tokenEnd; - token.assign(m_pos, pos); + token.assign(m_pos, tokenEnd); // skip the token and the trailing delimiter m_pos = pos + 1; -- 2.45.2