Skip to content

Commit

Permalink
Fixed vm max loop iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
dsrw committed Dec 6, 2023
1 parent 9b1912f commit 7f7841d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/config.nims
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
--mm:orc
--tls_emulation:off
--deepcopy:on
--max_loop_iterations_vm:"9_223_372_036_854_775_807"

if host_os == "windows":
--pass_l:"-static"
Expand Down
3 changes: 2 additions & 1 deletion src/libs/interpreters.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ proc init*(_: type Interpreter, script_dir, vmlib: string): Interpreter =
let source_paths = std_paths & join_path(vmlib, "enu") & @[script_dir]
{.gcsafe.}:
result = create_interpreter("base_api.nim", source_paths, defines =
@{"nimscript": "true", "nimconfig": "true"})
@{"nimscript": "true", "nimconfig": "true"})
result.config.max_loop_iterations_vm = int.high

proc pause*(ctx: ScriptCtx) =
ctx.pause_requested = true
Expand Down

0 comments on commit 7f7841d

Please sign in to comment.