mirror of
https://github.com/pevans/erc-c.git
synced 2025-02-17 07:32:05 +00:00
Erase strings before we print anything else
If you print something without an operand, you may end up printing the last instruction's operand unless you do that wipe
This commit is contained in:
parent
67c7790a1a
commit
aa53fdd77e
@ -259,6 +259,10 @@ mos6502_dis_opcode(mos6502 *cpu, FILE *stream, int address)
|
||||
int inst_code;
|
||||
int expected;
|
||||
|
||||
memset(s_bytes, 0, sizeof(s_bytes));
|
||||
memset(s_inst, 0, sizeof(s_inst));
|
||||
memset(s_operand, 0, sizeof(s_operand));
|
||||
|
||||
// The next byte is assumed to be the opcode we work with.
|
||||
opcode = mos6502_get(cpu, address);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user