From 39369269e8404b08fe2a7c38c266e9ef4a8c04f9 Mon Sep 17 00:00:00 2001 From: flobernd Date: Mon, 24 Jul 2017 22:03:41 +0200 Subject: [PATCH] Fixed formatting bug in ZydisInfo tool --- tools/ZydisInfo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/ZydisInfo.c b/tools/ZydisInfo.c index 5d40061..276fcf5 100644 --- a/tools/ZydisInfo.c +++ b/tools/ZydisInfo.c @@ -253,12 +253,12 @@ void printFlags(ZydisDecodedInstruction* instruction) uint8_t c = 0; for (ZydisCPUFlag i = 0; i < ZYDIS_ARRAY_SIZE(instruction->flags); ++i) { - if (c == 8) - { - printf("\n "); - } if (instruction->flags[i].action != ZYDIS_CPUFLAG_ACTION_NONE) { + if (c && (c % 8 == 0)) + { + printf("\n "); + } ++c; printf("[%-4s: %s] ", flagNames[i], flagActions[instruction->flags[i].action]); }