From 579f09c8379a00cecd7ad54962718c02a159a114 Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Wed, 27 Dec 2023 13:28:17 +0200 Subject: [PATCH] fix: pass arguments to regex constructor in LOAD_REGEX --- src/me/topchetoeu/jscript/engine/frame/Runners.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/me/topchetoeu/jscript/engine/frame/Runners.java b/src/me/topchetoeu/jscript/engine/frame/Runners.java index 51416d7..c9f0bb1 100644 --- a/src/me/topchetoeu/jscript/engine/frame/Runners.java +++ b/src/me/topchetoeu/jscript/engine/frame/Runners.java @@ -199,7 +199,7 @@ public class Runners { } public static Object execLoadRegEx(Context ctx, Instruction instr, CodeFrame frame) { if (ctx.has(Environment.REGEX_CONSTR)) { - frame.push(ctx, Values.callNew(ctx, ctx.get(Environment.REGEX_CONSTR))); + frame.push(ctx, Values.callNew(ctx, ctx.get(Environment.REGEX_CONSTR), instr.get(0), instr.get(1))); } else { throw EngineException.ofSyntax("Regex is not supported.");