Opcode dump with the proper size

This commit is contained in:
Ivan Izaguirre 2020-04-02 23:52:23 +02:00
parent fb29ae8ee7
commit 38a187ee5b
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ func (s *State) ExecuteInstruction() {
opcode.action(s, s.lineCache, opcode)
s.cycles += uint64(opcode.cycles)
if s.trace {
fmt.Printf("%v, [%02x]\n", s.reg, s.lineCache)
fmt.Printf("%v, [%02x]\n", s.reg, s.lineCache[0:opcode.bytes])
}
}