From e0ab0a6c671d03a9cb1877248c406b60a2b62686 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 28 May 2025 12:02:49 +0200 Subject: [PATCH] update bf interpreter --- lox/bf.lox | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lox/bf.lox b/lox/bf.lox index cb6deab..e43f8b9 100644 --- a/lox/bf.lox +++ b/lox/bf.lox @@ -71,7 +71,7 @@ class Interpreter { } - if (instruction == "[" and tape.current.data < 0.0001) { + if (instruction == "[" and tape.current.data == 0) { instruction = read(this.bfpath); var bracketCount = 1; while (bracketCount > 0 and instruction != nil) { @@ -81,7 +81,7 @@ class Interpreter { } } - if (instruction == "]" and tape.current.data >= 0.0001) { + if (instruction == "]" and tape.current.data != 0) { instruction = read(this.bfpath, true); var bracketCount = 1; while (bracketCount > 0 and instruction != nil) {