From c91fe2cc4b327ee929fce4b341550562c54a8fb0 Mon Sep 17 00:00:00 2001 From: flobernd Date: Thu, 21 Sep 2017 18:20:48 +0200 Subject: [PATCH] Fixed formatting of signed 8-bit immediate operands --- src/Formatter.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Formatter.c b/src/Formatter.c index 8306525..24386ab 100644 --- a/src/Formatter.c +++ b/src/Formatter.c @@ -368,6 +368,11 @@ static ZydisStatus ZydisFormatterPrintImmediateIntel(const ZydisFormatter* forma return ZYDIS_STATUS_INVALID_PARAMETER; } } + if (operand->size == 8) + { + return ZydisPrintHexU( + buffer, bufferLen, (uint8_t)operand->imm.value.u, 2, ZYDIS_TRUE, ZYDIS_TRUE); + } switch (instruction->operandSize) { case 16: