Fix bytelength calculation in disassembler.

This commit is contained in:
Lawrence Kesteloot 2018-08-02 15:16:48 -07:00
parent 4da1e4a2c7
commit 27123a09ea

View File

@ -68,7 +68,7 @@ tuple<int, string> disassemble_6502(int address, const unsigned char* buffer)
sprintf(p, "%04X %n", address, &stored); //Display current address at beginning of line
p += stored;
paramcount = opcode_props[currentbyte][0]; //Get instruction length
bytelength = 1 + paramcount;
bytelength = paramcount;
opcode = instruction[opcode_props[currentbyte][1]]; //Get opcode name
addrmode = opcode_props[currentbyte][2]; //Get info required to display addressing mode
pre = modes[addrmode][0]; //Look up pre-operand formatting text