Require single quotes when writing characters

This commit is contained in:
MCUdude 2022-02-17 22:43:23 +01:00
parent 551046052e
commit 10e05eed21
1 changed files with 2 additions and 2 deletions

View File

@ -416,8 +416,8 @@ static int cmd_write(PROGRAMMER * pgm, struct avrpart * p,
if (*e || (e == argv[i])) { if (*e || (e == argv[i])) {
ptr = NULL; ptr = NULL;
// Try single character // Try single character
if (argv[i][1] == '\0') { if (argv[i][0] == '\'' && argv[i][2] == '\'') {
write_val = argv[i][0]; write_val = argv[i][1];
} else { } else {
avrdude_message(MSG_INFO, "%s (write): can't parse data \"%s\"\n", avrdude_message(MSG_INFO, "%s (write): can't parse data \"%s\"\n",
progname, argv[i]); progname, argv[i]);