Skip to content

Commit

Permalink
Refactored utility function to be consistent with rest of the code
Browse files Browse the repository at this point in the history
  • Loading branch information
NaC-L committed Mar 8, 2024
1 parent c335a88 commit ba8597a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/ZydisFuzzShared.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,15 @@ void ZydisPrintInstruction(const ZydisDecodedInstruction* instruction,

#endif

void ZydisValidateImmediateSize(ZyanU64 value) {
if (value != 0 && value != 8 && value != 16 && value != 32 && value != 64) {
fprintf(stderr, "Value = 0x%016" PRIX64 " does not match any of the expected "
void ZydisValidateImmediateSize(ZyanU64 value)
{
if ((value != 0) &&
(value != 8) &&
(value != 16) &&
(value != 32) &&
(value != 64))
{
fprintf(stderr, "Value " #value " = 0x % 016" PRIX64 " does not match any of the expected "
"values (0, 8, 16, 32, 64).\n", value);
abort();
}
Expand Down

0 comments on commit ba8597a

Please sign in to comment.