Skip to content

Commit 3a1b78f

Browse files
committed
Goddamn debugged
1 parent 7fa2344 commit 3a1b78f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

brainfuck_interpreter.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
str_ind += 1
4848
elif x == "[":
4949
loop_start = point
50-
loop_end = info[point:].index("]")
50+
loop_end = point+info[point:].index("]")
5151
if ind[curr] == 0:
5252
point = loop_end
5353
elif x == "]":
@@ -59,8 +59,8 @@
5959
ind[curr] = 0
6060
elif x == "(":
6161
clb = info[point:].index(")")
62-
part = info[point+1:clb]
63-
exp = re.search(r" *(-*\d+) *([><=]+) *(-*\d+): *(\d+) *\? *(\d+)",info)
62+
part = info[point:clb+point]
63+
exp = re.search(r" *(-*\d+) *([><=]+) *(-*\d+): *(\d+) *\? *(\d+)",part)
6464
cell1 = exp.group(1)
6565
sign = exp.group(2)
6666
cell2 = exp.group(3)

0 commit comments

Comments
 (0)