Removed trailing whitespace after mnemonic for instructions without visible operands
@@ -857,11 +857,6 @@ static ZydisStatus ZydisFormatterFormatInstrIntel(const ZydisFormatter* formatte
ZYDIS_CHECK(formatter->funcPrintMnemonic(formatter, buffer, bufEnd - *buffer, instruction));
char* bufRestore = *buffer;
- if (instruction->operandCount > 0)
- {
- ZYDIS_CHECK(ZydisStringBufferAppend(buffer, bufEnd - *buffer, 0, " "));
- }
-
for (uint8_t i = 0; i < instruction->operandCount; ++i)
{
if (instruction->operands[i].visibility == ZYDIS_OPERAND_VISIBILITY_HIDDEN)
@@ -869,7 +864,10 @@ static ZydisStatus ZydisFormatterFormatInstrIntel(const ZydisFormatter* formatte
break;
}
- if (i != 0)
+ if (i == 0)
+ {
+ ZYDIS_CHECK(ZydisStringBufferAppend(buffer, bufEnd - *buffer, 0, " "));
+ } else
{
bufRestore = *buffer;
ZYDIS_CHECK(ZydisStringBufferAppend(buffer, bufEnd - *buffer, 0, ", "));
