From 5f012778b88f3fb7716ac1272a458c58e5aafdfd Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Tue, 5 Jul 2022 04:57:26 +0430 Subject: [PATCH] LibRegex: Use the correct values for comparing LUT entries Previously we were ignoring the insensitive flag for LUT lookups. --- Userland/Libraries/LibRegex/RegexByteCode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibRegex/RegexByteCode.cpp b/Userland/Libraries/LibRegex/RegexByteCode.cpp index 594de49831..de7ce26444 100644 --- a/Userland/Libraries/LibRegex/RegexByteCode.cpp +++ b/Userland/Libraries/LibRegex/RegexByteCode.cpp @@ -538,9 +538,9 @@ ALWAYS_INLINE ExecutionResult OpCode_Compare::execute(MatchInput const& input, M to = to_ascii_lowercase(to); needle = to_ascii_lowercase(needle); } - if (needle > range.to) + if (needle > to) return 1; - if (needle < range.from) + if (needle < from) return -1; return 0; });