each_with_address -> each_with_index (fix bad refactor)

This commit is contained in:
Matthew Berry 2022-12-03 10:40:08 -08:00
parent 120abb5261
commit 591c8b41c3

View file

@ -291,7 +291,7 @@ module GBA
end
def print_state(instr : UInt32? = nil) : Nil
@r.each_with_address do |val, reg|
@r.each_with_index do |val, reg|
print "#{hex_str reg == 15 ? val - (@cpsr.thumb ? 2 : 4) : val, prefix: false} "
end
instr ||= @pipeline.peek