Permalink
Browse files

Debugger: Fix long disassemblies

  • Loading branch information...
endrift committed May 12, 2018
1 parent dadcf40 commit ee3969ad020e4f13459bc55214f36455b6bc0e01
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/arm/debugger/cli-debugger.c
  2. +1 −1 src/arm/decoder.c
  3. +1 −1 src/lr35902/decoder.c
@@ -93,7 +93,7 @@ static void _disassembleMode(struct CLIDebugger* debugger, struct CLIDebugVector
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) {
View
@@ -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; \
} \
View
@@ -409,7 +409,7 @@ size_t LR35902Decode(uint8_t opcode, struct LR35902InstructionInfo* info) {
}
#define ADVANCE(AMOUNT) \
- if (AMOUNT > blen) { \
+ if (AMOUNT >= blen) { \
buffer[blen - 1] = '\0'; \
return total; \
} \

0 comments on commit ee3969a

Please sign in to comment.