Tentative de régler le bordel

This commit is contained in:
Gauvain Boiché
2020-03-31 15:58:31 +02:00
parent a1864c0414
commit 459b46df7b
345 changed files with 10758 additions and 4066 deletions

View File

@@ -285,8 +285,9 @@ class diff_engine
$matches = $ymatches[$line];
reset($matches);
while (list(, $y) = each($matches))
while ($y = current($matches))
{
next($matches);
if (empty($this->in_seq[$y]))
{
$k = $this->_lcs_pos($y);
@@ -296,8 +297,9 @@ class diff_engine
}
// no reset() here
while (list(, $y) = each($matches))
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.