mirror of
https://github.com/tio/tio.git
synced 2026-05-01 14:57:59 +02:00
Merge pull request #120 from nh26223/newline_fix_for_hex_mode
Output newline on stdout with hex print mode
This commit is contained in:
commit
3a1fd79fcb
1 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue