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.
This commit is contained in:
Martin Lund 2024-07-10 13:11:25 +02:00
parent b5184012c4
commit c3654486c7

View file

@ -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;