1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16277] Adjust patch for the diff engine

PHPBB3-16277
This commit is contained in:
rxu
2019-12-30 21:27:12 +07:00
parent 80de9f6a68
commit 374dc92e8f

View File

@@ -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.