Minor bugfixes

This commit is contained in:
flobernd 2018-02-08 01:48:37 +01:00
parent 289e85282d
commit 05aba7a445
No known key found for this signature in database
GPG Key ID: 9C3AE0ED4A969F10
1 changed files with 10 additions and 0 deletions

View File

@ -1197,6 +1197,11 @@ ZydisStatus ZydisFormatterFormatInstructionEx(const ZydisFormatter* formatter,
const ZydisStatus status = ZydisFormatInstruction(formatter, instruction, &string, userData);
buffer[string.length] = 0;
if (status == ZYDIS_STATUS_SKIP_OPERAND)
{
return ZYDIS_STATUS_SUCCESS;
}
return status;
}
@ -1263,6 +1268,11 @@ ZydisStatus ZydisFormatterFormatOperandEx(const ZydisFormatter* formatter,
status = ZYDIS_STATUS_INVALID_PARAMETER;
break;
}
// Ignore `ZYDIS_STATUS_SKIP_OPERAND`
if (status == ZYDIS_STATUS_SKIP_OPERAND)
{
status = ZYDIS_STATUS_SUCCESS;
}
if (!ZYDIS_SUCCESS(status))
{
goto FinalizeString;