all repos — mgba @ ee3969ad020e4f13459bc55214f36455b6bc0e01

mGBA Game Boy Advance Emulator

Debugger: Fix long disassemblies
Vicki Pfau vi@endrift.com
Sat, 12 May 2018 09:47:25 -0700
commit

ee3969ad020e4f13459bc55214f36455b6bc0e01

parent

dadcf40ee2257ee08264336f7622437db699cd3c

3 files changed, 3 insertions(+), 3 deletions(-)

jump to
M src/arm/debugger/cli-debugger.csrc/arm/debugger/cli-debugger.c

@@ -93,7 +93,7 @@ }

static inline uint32_t _printLine(struct CLIDebugger* debugger, uint32_t address, enum ExecutionMode mode) { struct CLIDebuggerBackend* be = debugger->backend; - char disassembly[48]; + char disassembly[64]; struct ARMInstructionInfo info; be->printf(be, "%08X: ", address); if (mode == MODE_ARM) {
M src/arm/decoder.csrc/arm/decoder.c

@@ -8,7 +8,7 @@

#include <mgba/internal/arm/decoder-inlines.h> #define ADVANCE(AMOUNT) \ - if (AMOUNT > blen) { \ + if (AMOUNT >= blen) { \ buffer[blen - 1] = '\0'; \ return total; \ } \
M src/lr35902/decoder.csrc/lr35902/decoder.c

@@ -409,7 +409,7 @@ return decoder(opcode, info);

} #define ADVANCE(AMOUNT) \ - if (AMOUNT > blen) { \ + if (AMOUNT >= blen) { \ buffer[blen - 1] = '\0'; \ return total; \ } \