Ensure terminal write fill mode ... always fills with last data item

This commit is contained in:
Stefan Rueger 2022-07-12 11:15:30 +01:00
parent 39a00bc71e
commit d3ad078577
1 changed files with 3 additions and 3 deletions

View File

@ -421,14 +421,14 @@ static int cmd_write(PROGRAMMER * pgm, struct avrpart * p,
};
for (i = start_offset; i < len + start_offset; i++) {
data.is_float = false;
data.size = 0;
// Handle the next argument
if (i < argc - start_offset + 3) {
char *argi = argv[i];
size_t arglen = strlen(argi);
data.is_float = false;
data.size = 0;
// Free string pointer if already allocated
if(data.str_ptr) {
free(data.str_ptr);