Skip to content

Commit

Permalink
Fixed character in position
Browse files Browse the repository at this point in the history
  • Loading branch information
antalaron committed Sep 20, 2017
1 parent e356b0d commit 07234af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/MbSimilarText.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function mb_similar_text($str1, $str2, &$percent = null)

for ($p = 0; $p < $l1; ++$p) {
for ($q = 0; $q < $l2; ++$q) {
for ($l = 0; ($p + $l < $l1) && ($q + $l < $l2) && $str1[$p + $l] === $str2[$q + $l]; ++$l) {
for ($l = 0; ($p + $l < $l1) && ($q + $l < $l2) && mb_substr($str1, $p + $l, 1) === mb_substr($str2, $q + $l, 1); ++$l) {
// nothing to do
}
if ($l > $max) {
Expand Down

0 comments on commit 07234af

Please sign in to comment.