Merge pull request #120 from nh26223/newline_fix_for_hex_mode

Output newline on stdout with hex print mode
This commit is contained in:
Martin Lund 2021-01-21 09:50:47 +01:00 committed by GitHub
commit 3a1fd79fcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,7 +70,12 @@ static bool map_o_del_bs = false;
static void print_hex(char c)
{
printf("%02x ", (unsigned char) c);
if ((c == '\n') || (c == '\r'))
printf("%c", c);
else
printf("%02x ", (unsigned char) c);
fflush(stdout);
}