Skip to content

Commit

Permalink
Fix upload of one-byte files to flash
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanrueger committed Jan 23, 2024
1 parent 2f89aec commit a59493f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/avr.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ int avr_mem_hiaddr(const AVRMEM * mem)

/* return the highest non-0xff address regardless of how much
memory was read */
for (i=mem->size-1; i>0; i--) {
for (i = mem->size-1; i >= 0; i--) {
if (mem->buf[i] != 0xff) {
n = i+1;
if (n & 0x01)
Expand Down

0 comments on commit a59493f

Please sign in to comment.