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 {