We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7fa2344 commit 3a1b78fCopy full SHA for 3a1b78f
brainfuck_interpreter.py
@@ -47,7 +47,7 @@
47
str_ind += 1
48
elif x == "[":
49
loop_start = point
50
- loop_end = info[point:].index("]")
+ loop_end = point+info[point:].index("]")
51
if ind[curr] == 0:
52
point = loop_end
53
elif x == "]":
@@ -59,8 +59,8 @@
59
ind[curr] = 0
60
elif x == "(":
61
clb = info[point:].index(")")
62
- part = info[point+1:clb]
63
- exp = re.search(r" *(-*\d+) *([><=]+) *(-*\d+): *(\d+) *\? *(\d+)",info)
+ part = info[point:clb+point]
+ exp = re.search(r" *(-*\d+) *([><=]+) *(-*\d+): *(\d+) *\? *(\d+)",part)
64
cell1 = exp.group(1)
65
sign = exp.group(2)
66
cell2 = exp.group(3)
0 commit comments