Allow optional comma separators for data items in terminal write

This commit is contained in:
Stefan Rueger 2022-07-12 11:39:52 +01:00
parent 5c4cfa642a
commit 0b2f38c67d
1 changed files with 4 additions and 0 deletions

View File

@ -616,6 +616,10 @@ static int cmd_write(PROGRAMMER * pgm, struct avrpart * p,
data.str_ptr = NULL;
}
// remove trailing comma to allow cut and paste of lists
if(arglen > 0 && argi[arglen-1] == ',')
argi[--arglen] = 0;
// Try integers and assign data size
errno = 0;
data.ull = strtoull(argi, &end_ptr, 0);