From c3654486c79d323d6a2485283897df77cbbc4cf4 Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Wed, 10 Jul 2024 13:11:25 +0200 Subject: [PATCH] Fix hex output mode when using normal input mode In this combination of modes the input character was not forwarded to the tty device. This fix makes sure it is forwarded. --- src/tty.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/tty.c b/src/tty.c index 2fb2e97..c7f2e73 100644 --- a/src/tty.c +++ b/src/tty.c @@ -2232,11 +2232,17 @@ void forward_to_tty(int fd, char output_char) { handle_hex_prompt(output_char); } - else + else if (option.input_mode == INPUT_MODE_NORMAL) { - if (option.input_mode == INPUT_MODE_NORMAL) + ssize_t status = tty_write(device_fd, &output_char, 1); + if (status < 0) + { + tio_warning_printf("Could not write to tty device"); + } + else { optional_local_echo(output_char); + tx_total++; } } break;