Skip to content

Commit e0ba8ab

Browse files
committed
patch #194
1 parent 8675e27 commit e0ba8ab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/CatLib.Core.Tests/Support/Util/StrTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ public void TestLevenshtein()
353353
{
354354
Assert.AreEqual(4, Str.Levenshtein("hello", "world"));
355355
Assert.AreEqual(5, Str.Levenshtein("hello", "catlib"));
356+
Assert.AreEqual(10, Str.Levenshtein("hello", "catlib-world"));
356357
}
357358

358359
[TestMethod]

src/CatLib.Core/Support/Util/Str.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ public static int Levenshtein(string str1, string str2)
517517
}
518518

519519
var p1 = new int[length2 + 1];
520-
var p2 = new int[length1 + 1];
520+
var p2 = new int[length2 + 1];
521521

522522
for (var i = 0; i <= length2; i++)
523523
{

0 commit comments

Comments
 (0)