From 72c3b4ed13a93f2bf2cd36c99b26f77d82a4c84e Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 16 Nov 2001 12:24:40 +0000 Subject: [PATCH] Fix for broken split (doesn't spit out all sub expressions). [SVN r11716] --- include/boost/regex/detail/regex_split.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/regex/detail/regex_split.hpp b/include/boost/regex/detail/regex_split.hpp index 32e78bc4..8fd5a5af 100644 --- a/include/boost/regex/detail/regex_split.hpp +++ b/include/boost/regex/detail/regex_split.hpp @@ -69,8 +69,9 @@ bool split_pred::operator() { *(*p_out) = static_cast(what[i]); ++(*p_out); - return --*p_max; + if(0 == --*p_max) return false; } + return *p_max != 0; } else {