diff --git a/LiteDB/Utils/Extensions/StringExtensions.cs b/LiteDB/Utils/Extensions/StringExtensions.cs index 12270ee39..eb777da5e 100644 --- a/LiteDB/Utils/Extensions/StringExtensions.cs +++ b/LiteDB/Utils/Extensions/StringExtensions.cs @@ -148,6 +148,8 @@ public static bool SqlLike(this string str, string pattern, Collation collation) { if (lastWildCard >= 0) { + int back = patternIndex - lastWildCard - 1; + i -= back; patternIndex = lastWildCard; } else