Skip to content

Instantly share code, notes, and snippets.

@Xunnamius
Created May 6, 2020 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Xunnamius/4fa1f887c01152b899aedb893cb6d005 to your computer and use it in GitHub Desktop.
Save Xunnamius/4fa1f887c01152b899aedb893cb6d005 to your computer and use it in GitHub Desktop.
Pretty print (kinda) some hex in C
static void debug_print_hex(const uint8_t * data, size_t len)
{
for(size_t i = 0; i < len; i++)
fprintf(stderr, "0x%x ", data[i] & 0xFF);
fprintf(stderr, "\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment