fix off-by-one error in execution code.

This commit is contained in:
trans_soup 2023-11-06 16:08:06 +01:00
parent 0d99d58812
commit 2778216ff6
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ export function execute (program, arg = id) {
function call_fn (fn, env = []) {
if (typeof fn === "number") {
while (fn > 0) {
while (fn > 1) {
fn--;
env = env[1];
}