Skip to content

Commit 56e3f40

Browse files
committed
Fix bugs not terminating correctly
1 parent 1ea95df commit 56e3f40

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

patch.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,12 @@ def patch_timing(ctx): # {{{1 Main infrastructure: starting and failing the ques
143143

144144
# 56, 58
145145
with ctx.get("c0400") as (vita, pc):
146-
copy_clause(vita, pc, 49, pc.code[49].index(Insn('EXPR_VAR', 3, [Insn('CONST', 0), Insn('SET'), Insn('END')]))+9)
147-
copy_clause(vita, pc, 49, pc.code[49].index(Insn('EXPR_VAR', 3, [Insn('CONST', 0), Insn('SET'), Insn('END')]))+10)
148-
copy_clause(vita, pc, 49, pc.code[49].index(Insn('ITEM_REMOVE', 805, 1))+8)
149-
copy_clause(vita, pc, 49, pc.code[49].index(Insn('ITEM_REMOVE', 805, 1))+9)
146+
pc_index = pc.code[49].index(Insn('EXPR_VAR', 3, [Insn('CONST', 0), Insn('SET'), Insn('END')]))
147+
vita_index = vita.code[49].index(Insn('EXPR_VAR', 3, [Insn('CONST', 0), Insn('SET'), Insn('END')]))
148+
pc.code[49][pc_index+9:pc_index+9] = vita.code[49][vita_index+9:vita_index+11]
149+
pc_index = pc.code[49].index(Insn('ITEM_REMOVE', 805, 1))
150+
vita_index = vita.code[49].index(Insn('ITEM_REMOVE', 805, 1))
151+
pc.code[49][pc_index+8:pc_index+8] = vita.code[49][vita_index+8:vita_index+10]
150152

151153
# 55
152154
with ctx.get("t105b") as (vita, pc):

0 commit comments

Comments
 (0)