Created
May 6, 2020 16:57
-
-
Save Xunnamius/4fa1f887c01152b899aedb893cb6d005 to your computer and use it in GitHub Desktop.
Pretty print (kinda) some hex in C
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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