--- parser3/src/main/pa_string.C 2002/02/21 14:36:54 1.143 +++ parser3/src/main/pa_string.C 2002/02/22 12:20:27 1.145 @@ -4,7 +4,7 @@ Copyright (c) 2001, 2002 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) - $Id: pa_string.C,v 1.143 2002/02/21 14:36:54 paf Exp $ + $Id: pa_string.C,v 1.145 2002/02/22 12:20:27 paf Exp $ */ #include "pcre.h" @@ -644,14 +644,16 @@ void String::join_chain(Pool& pool, STRING_PREPARED_FOREACH_ROW(*this, if(row->item.lang==joined_lang) { memcpy(ptr, row->item.ptr, row->item.size); ptr+=row->item.size; - } else + } else { + --row; ++countdown; // step back from not-ours break; + } ); - // return joined rows - achunk=chunk; - arow=row-1; // -1 to step back from last row|row with wrong lang, see String::reconstruct - acountdown=countdown; + // set pointers after joined piece + achunk=chunk; arow=row; acountdown=countdown; + // & one step back, see String::reconstruct + --row; ++countdown; } }