From 10e05eed21a8a0b3120bf347a7211e86af4e0fc9 Mon Sep 17 00:00:00 2001 From: MCUdude Date: Thu, 17 Feb 2022 22:43:23 +0100 Subject: [PATCH] Require single quotes when writing characters --- src/term.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/term.c b/src/term.c index 4adb36b3..1d0bca98 100644 --- a/src/term.c +++ b/src/term.c @@ -416,8 +416,8 @@ static int cmd_write(PROGRAMMER * pgm, struct avrpart * p, if (*e || (e == argv[i])) { ptr = NULL; // Try single character - if (argv[i][1] == '\0') { - write_val = argv[i][0]; + if (argv[i][0] == '\'' && argv[i][2] == '\'') { + write_val = argv[i][1]; } else { avrdude_message(MSG_INFO, "%s (write): can't parse data \"%s\"\n", progname, argv[i]);