From a42f3f78d196b26183a979a9241ee5290a78942d Mon Sep 17 00:00:00 2001 From: Martin Lund Date: Sat, 16 Sep 2023 14:50:41 +0200 Subject: [PATCH] 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. --- src/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty.c b/src/tty.c index 12df23e..027e795 100644 --- a/src/tty.c +++ b/src/tty.c @@ -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"); }