mirror of
https://github.com/zyantific/zydis
synced 2026-06-08 18:41:39 +00:00
Pad addresses to address width
This commit is contained in:
@@ -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
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user