Overwrite old stale letters on xmodem filename input

When entering a file name, eg. 'test' it whould output the following
with 2 stale letters of the former input string:

[14:41:58.987] Send file with XMODEM
[14:42:08.015] Sending file 'test'st
[14:42:08.015] Press any key to abort transfer

To avoid this we simply overwrite the 2 stale letters with whitespaces.
This commit is contained in:
Martin Lund 2023-09-16 14:50:41 +02:00
parent 93e49ab5a2
commit a42f3f78d1

View file

@ -770,7 +770,7 @@ void handle_command_sequence(char input_char, char *output_char, bool *forward)
tio_printf("Send file with %cMODEM", toupper(input_char));
tio_printf_raw("Enter file name: ");
if (tio_readln()) {
tio_printf("Sending file '%s'", line);
tio_printf("Sending file '%s' ", line);
tio_printf("Press any key to abort transfer");
tio_printf("%s", xymodem_send(fd, line, input_char) < 0 ? "Aborted" : "Done");
}