--- embedaddon/pcre/pcrecpp.cc 2012/02/21 23:05:51 1.1 +++ embedaddon/pcre/pcrecpp.cc 2013/07/22 08:25:56 1.1.1.3 @@ -384,7 +384,6 @@ int RE::GlobalReplace(const StringPiece& rewrite, int vec[kVecSize]; string out; int start = 0; - int lastend = -1; bool last_match_was_empty_string = false; while (start <= static_cast(str->length())) { @@ -440,7 +439,6 @@ int RE::GlobalReplace(const StringPiece& rewrite, out.append(*str, start, matchstart - start); Rewrite(&out, rewrite, *str, vec, matches); start = matchend; - lastend = matchend; count++; last_match_was_empty_string = (matchstart == matchend); } @@ -523,7 +521,10 @@ int RE::TryMatch(const StringPiece& text, extra.match_limit_recursion = options_.match_limit_recursion(); } - int options = 0; + // int options = 0; + // Changed by PH as a result of bugzilla #1288 + int options = (options_.all_options() & PCRE_NO_UTF8_CHECK); + if (anchor != UNANCHORED) options |= PCRE_ANCHORED; if (!empty_ok)