From 374dc92e8f5659f4035bee05a902e773fede1177 Mon Sep 17 00:00:00 2001 From: rxu Date: Mon, 30 Dec 2019 21:27:12 +0700 Subject: [ticket/16277] Adjust patch for the diff engine PHPBB3-16277 --- phpBB/includes/diff/engine.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'phpBB') 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. -- cgit v1.2.1