aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2019-12-30 21:27:12 +0700
committerrxu <rxu@mail.ru>2020-01-01 04:07:11 +0700
commit374dc92e8f5659f4035bee05a902e773fede1177 (patch)
treeca51afe0b085599bd5cd1862bfcd9122a8011b4a
parent80de9f6a68d7b50eb5387cdc2b99624484e75201 (diff)
downloadforums-374dc92e8f5659f4035bee05a902e773fede1177.tar
forums-374dc92e8f5659f4035bee05a902e773fede1177.tar.gz
forums-374dc92e8f5659f4035bee05a902e773fede1177.tar.bz2
forums-374dc92e8f5659f4035bee05a902e773fede1177.tar.xz
forums-374dc92e8f5659f4035bee05a902e773fede1177.zip
[ticket/16277] Adjust patch for the diff engine
PHPBB3-16277
-rw-r--r--phpBB/includes/diff/engine.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/phpBB/includes/diff/engine.php b/phpBB/includes/diff/engine.php
index 19e0bcf09e..0d73db02da 100644
--- a/phpBB/includes/diff/engine.php
+++ b/phpBB/includes/diff/engine.php
@@ -287,6 +287,7 @@ class diff_engine
reset($matches);
while ($y = current($matches))
{
+ next($matches);
if (empty($this->in_seq[$y]))
{
$k = $this->_lcs_pos($y);
@@ -298,6 +299,7 @@ class diff_engine
// no reset() here
while ($y = current($matches))
{
+ next($matches);
if ($y > $this->seq[$k - 1])
{
// Optimization: this is a common case: next match is just replacing previous match.