diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2017-03-26 13:44:28 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2017-03-26 13:44:28 (GMT) |
commit | 78169fc7f8a7150cd22cfe80204cb2faaa991ba5 (patch) | |
tree | ba5bc17f43af044a408dbf07b9f70fffa5ec3bb8 /src/arch | |
parent | 4319c0ae542b60f225d0f6ce373fe8d2e5f1475d (diff) |
Fixed the conversion of immediate operands to binary strings.
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/immediate.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/arch/immediate.c b/src/arch/immediate.c index 5970f06..1b13ea1 100644 --- a/src/arch/immediate.c +++ b/src/arch/immediate.c @@ -759,7 +759,11 @@ static size_t _g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syn } /* Modification de la longueur fournie */ - lmod = lmod_defs[range]; + + if (display != IOD_BIN) + lmod = lmod_defs[range]; + else + lmod = ""; /* Spécification de la conversion */ @@ -774,7 +778,8 @@ static size_t _g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syn else { if (operand->zpad) - max = range * 8 + 1; + max = range * 8; + else { if (!msb_64(operand->raw, &max)) @@ -782,8 +787,6 @@ static size_t _g_imm_operand_to_string(const GImmOperand *operand, AsmSyntax syn conv = "0"; max = 0; } - else - max++; } if (max > 0) |