diff options
| -rw-r--r-- | arch/mips/arch_mips.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/arch/mips/arch_mips.cpp b/arch/mips/arch_mips.cpp index 85fbeb36..d7b1d980 100644 --- a/arch/mips/arch_mips.cpp +++ b/arch/mips/arch_mips.cpp @@ -847,18 +847,15 @@ public: break; case MEM_IMM: result.emplace_back(BeginMemoryOperandToken, ""); - if (imm != 0) - { - if (imm < -9) - snprintf(operand, sizeof(operand), "-%#x", -imm); - else if (imm < 0) - snprintf(operand, sizeof(operand), "-%d", -imm); - else if (imm < 10) - snprintf(operand, sizeof(operand), "%d", imm); - else - snprintf(operand, sizeof(operand), "%#x", imm); - result.emplace_back(IntegerToken, operand, imm); - } + if (imm < -9) + snprintf(operand, sizeof(operand), "-%#x", -imm); + else if (imm < 0) + snprintf(operand, sizeof(operand), "-%d", -imm); + else if (imm < 10) + snprintf(operand, sizeof(operand), "%d", imm); + else + snprintf(operand, sizeof(operand), "%#x", imm); + result.emplace_back(IntegerToken, operand, imm); if (instr.operands[i].reg == REG_ZERO) break; result.emplace_back(BraceToken, "("); |
