X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f0dfc29c713f1341a33b272aa395db9c36405a83..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/common/tokenzr.cpp 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;