From 23694f4d5a0c1a62b09d6f04b8603dce486780ac Mon Sep 17 00:00:00 2001 From: Jiayi Peng Date: Thu, 8 Sep 2022 13:41:02 +0800 Subject: [PATCH] try fix SqlLike --- LiteDB/Utils/Extensions/StringExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) 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