--- parser3/src/main/pa_string.C 2003/03/24 15:56:59 1.172.2.21.2.25 +++ parser3/src/main/pa_string.C 2003/03/24 16:43:27 1.172.2.21.2.27 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_STRING_C="$Date: 2003/03/24 15:56:59 $"; +static const char* IDENT_STRING_C="$Date: 2003/03/24 16:43:27 $"; #include "pcre.h" @@ -52,6 +52,9 @@ void String::ArrayFragment::append_posit if(substr_beginfragment_end) // not reached fragments which may include 'substr'? + continue; + // found first fragment including piece of 'substr' size_t piece_end=min(substr_end, fragment_end); *this+=Fragment(fragment.lang, piece_end-substr_begin); @@ -73,10 +76,6 @@ void String::ArrayFragment::append_posit break; } } -/* -void String::ArrayFragment::mid(ArrayFragment& result, size_t substr_begin, size_t substr_end) { -} -*/ // StringSimple methods @@ -284,7 +283,7 @@ Table* String::match(Charset& source_cha const char* errptr; int erroffset; bool need_pre_post_match=false; - int option_bits[2]; regex_options(options, option_bits, need_pre_post_match); + int option_bits[2]={0}; regex_options(options, option_bits, need_pre_post_match); bool global=option_bits[1]!=0; pcre *code=pcre_compile(pattern, option_bits[0], &errptr, &erroffset,