Pad addresses to address width

This commit is contained in:
mappzor
2024-02-04 22:11:43 +01:00
committed by Joel Höner
parent 1c260f1578
commit 1ba34eb750
3 changed files with 7 additions and 7 deletions
+4 -4
View File
@@ -176,16 +176,16 @@ typedef enum ZydisFormatterProperty_
/**
* Controls the padding of absolute address values.
*
* Pass `ZYDIS_PADDING_DISABLED` to disable padding, `ZYDIS_PADDING_AUTO` to padd all
* addresses to the current stack width (hexadecimal only), or any other integer value for
* Pass `ZYDIS_PADDING_DISABLED` to disable padding, `ZYDIS_PADDING_AUTO` to pad all
* addresses to the current address width (hexadecimal only), or any other integer value for
* custom padding.
*/
ZYDIS_FORMATTER_PROP_ADDR_PADDING_ABSOLUTE,
/**
* Controls the padding of relative address values.
*
* Pass `ZYDIS_PADDING_DISABLED` to disable padding, `ZYDIS_PADDING_AUTO` to padd all
* addresses to the current stack width (hexadecimal only), or any other integer value for
* Pass `ZYDIS_PADDING_DISABLED` to disable padding, `ZYDIS_PADDING_AUTO` to pad all
* addresses to the current address width (hexadecimal only), or any other integer value for
* custom padding.
*/
ZYDIS_FORMATTER_PROP_ADDR_PADDING_RELATIVE,
+2 -2
View File
@@ -235,7 +235,7 @@ ZyanStatus ZydisFormatterBasePrintAddressABS(const ZydisFormatter* formatter,
if ((formatter->addr_padding_absolute == ZYDIS_PADDING_AUTO) &&
(formatter->addr_base == ZYDIS_NUMERIC_BASE_HEX))
{
switch (context->instruction->stack_width)
switch (context->instruction->address_width)
{
case 16:
padding = 4;
@@ -275,7 +275,7 @@ ZyanStatus ZydisFormatterBasePrintAddressREL(const ZydisFormatter* formatter,
if ((formatter->addr_padding_relative == ZYDIS_PADDING_AUTO) &&
(formatter->addr_base == ZYDIS_NUMERIC_BASE_HEX))
{
switch (context->instruction->stack_width)
switch (context->instruction->address_width)
{
case 16:
padding = 4;
+1 -1
View File
@@ -426,7 +426,7 @@ ZyanStatus ZydisFormatterIntelPrintAddressMASM(const ZydisFormatter* formatter,
if ((formatter->addr_padding_relative == ZYDIS_PADDING_AUTO) &&
(formatter->addr_base == ZYDIS_NUMERIC_BASE_HEX))
{
switch (context->instruction->stack_width)
switch (context->instruction->address_width)
{
case 16:
padding = 4;