Fix instruction resetting

which happens on insert of a new instruction
This commit is contained in:
Torsten Ruger
2018-05-08 20:53:48 +03:00
parent 7ca7e92dda
commit 6a1528e75a
3 changed files with 12 additions and 5 deletions

View File

@ -114,11 +114,9 @@ module Risc
end
def reset_to(pos)
changed = super(pos)
super(pos)
#puts "Reset (#{changed}) #{instruction}"
return unless changed
return unless instruction.next
instruction.next.set_position( pos + instruction.byte_length , 0)
init(pos)
end
end