minor regex fixes

[SVN r7878]
This commit is contained in:
John Maddock
2000-09-30 10:36:58 +00:00
parent 8a5e8b8c62
commit e345f05fa9
2 changed files with 4 additions and 3 deletions

View File

@ -1959,12 +1959,12 @@ unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::fixup_leadi
leading_lit = false;
break;
case re_detail::syntax_element_rep:
if(1 == fixup_leading_rep(dat->next.p, ((re_detail::re_repeat*)dat)->alt.p) )
if((len == 0) && (1 == fixup_leading_rep(dat->next.p, ((re_detail::re_repeat*)dat)->alt.p) ))
{
((re_detail::re_repeat*)dat)->leading = true;
return len;
}
return 0;
return len;
default:
break;
}

View File

@ -24,13 +24,13 @@
#include <boost/re_detail/regex_config.hpp>
#include <boost/re_detail/regex_raw_buffer.hpp>
#include <boost/regex.hpp>
#include <ostream>
#ifdef BOOST_MSVC
#include <crtdbg.h>
#endif
#ifdef BOOST_RE_DEBUG
#include <ostream>
namespace boost { namespace re_detail {
std::ostream& operator<<(std::ostream& s, syntax_element_type x)
@ -206,3 +206,4 @@ debug_guard::~debug_guard()
#endif