From 9aa6bef6d92b09488826b53f9b34fe60a5a565ec Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 28 May 2025 09:40:35 +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..bb9281b 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) {