mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
LibRegex: Fix handling of + quantifier with zero-width matches
Small change that allows quantifiers using Fork* forms (e.g., +) to succeed after one match, even if that match has zero width.
This commit is contained in:
parent
2380fb0ca1
commit
486602e796
Notes:
github-actions[bot]
2025-06-02 13:53:33 +00:00
Author: https://github.com/aplefull
Commit: 486602e796
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4949
Reviewed-by: https://github.com/alimpfard ✅
Reviewed-by: https://github.com/trflynn89
2 changed files with 15 additions and 2 deletions
|
@ -1121,9 +1121,8 @@ ALWAYS_INLINE ExecutionResult OpCode_JumpNonEmpty::execute(MatchInput const& inp
|
|||
}
|
||||
}
|
||||
|
||||
if (state.string_position < input.view.length()) {
|
||||
if (form() == OpCodeId::Jump && state.string_position < input.view.length())
|
||||
return ExecutionResult::Failed_ExecuteLowPrioForks;
|
||||
}
|
||||
|
||||
return ExecutionResult::Continue;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue