From 5255c45b0abb0bc5381a83547484428e0ce09d72 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 17 Jun 2003 10:28:51 +0000 Subject: [PATCH] Fixed bug in token_iterator that caused it to miss items when field splitting. [SVN r18821] --- include/boost/regex/v4/regex_token_iterator.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/regex/v4/regex_token_iterator.hpp b/include/boost/regex/v4/regex_token_iterator.hpp index 2c68ad9e..829b57dd 100644 --- a/include/boost/regex/v4/regex_token_iterator.hpp +++ b/include/boost/regex/v4/regex_token_iterator.hpp @@ -62,13 +62,14 @@ public: bool init(BidirectionalIterator first) { + N = 0; if(regex_search(first, end, what, *pre, flags) == true) { N = 0; result = ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[(int)subs[N]].str())); return true; } - else if((N == -1) && (first != end)) + else if((subs[N] == -1) && (first != end)) { result = value_type(first, end); return true;