LibRegex: Use the right offset when patching jumps through fork-trees

Fixes #4474.
This commit is contained in:
Ali Mohammad Pur 2025-04-25 20:43:33 +02:00 committed by Ali Mohammad Pur
commit 022cd1adca
Notes: github-actions[bot] 2025-04-27 10:17:08 +00:00
2 changed files with 3 additions and 1 deletions

View file

@ -1560,7 +1560,7 @@ void Optimizer::append_alternation(ByteCode& target, Span<ByteCode> alternatives
target.append(static_cast<ByteCodeValueType>(OpCodeId::ForkJump));
patch_location = target.size();
should_negate = false;
patch_size = 2;
patch_size = 1;
target.append(static_cast<ByteCodeValueType>(0));
}