mirror of
https://github.com/pevans/erc-c.git
synced 2026-04-20 09:17:08 +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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user