Ticket #41526: 41526.patch
File 41526.patch, 1.4 KB (added by , 8 years ago) |
---|
-
Engine/native.php
189 189 continue; 190 190 } 191 191 $matches = $ymatches[$line]; 192 reset($matches); 193 while (list(, $y) = each($matches)) { 192 foreach ($matches as $y) { 194 193 if (empty($this->in_seq[$y])) { 195 194 $k = $this->_lcsPos($y); 196 195 assert($k > 0); 197 196 $ymids[$k] = $ymids[$k - 1]; 198 197 break; 199 } 200 } 201 while (list(, $y) = each($matches)) { 202 if ($y > $this->seq[$k - 1]) { 198 } elseif ($y > $this->seq[$k - 1]) { 203 199 assert($y <= $this->seq[$k]); 204 /* Optimization: this is a common case: next match is205 * just replacing previous match. */206 200 $this->in_seq[$this->seq[$k]] = false; 207 201 $this->seq[$k] = $y; 208 202 $this->in_seq[$y] = 1; 209 } elseif (empty($this->in_seq[$y])) {210 $k = $this->_lcsPos($y);211 assert($k > 0);212 $ymids[$k] = $ymids[$k - 1];213 203 } 214 204 } 215 205 }