Fixed bug in token_iterator that caused it to miss items when field splitting.

[SVN r18821]
This commit is contained in:
John Maddock
2003-06-17 10:28:51 +00:00
parent ed48905c5e
commit 5255c45b0a

View File

@ -62,13 +62,14 @@ public:
bool init(BidirectionalIterator first) bool init(BidirectionalIterator first)
{ {
N = 0;
if(regex_search(first, end, what, *pre, flags) == true) if(regex_search(first, end, what, *pre, flags) == true)
{ {
N = 0; N = 0;
result = ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[(int)subs[N]].str())); result = ((subs[N] == -1) ? value_type(what.prefix().str()) : value_type(what[(int)subs[N]].str()));
return true; return true;
} }
else if((N == -1) && (first != end)) else if((subs[N] == -1) && (first != end))
{ {
result = value_type(first, end); result = value_type(first, end);
return true; return true;