Skip to content

Commit 4153976

Browse files
committed
Don't check the address validity for an EOF record.
1 parent 6718f2d commit 4153976

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/intel_hex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ uint8_t ihx_check_line(char line[]) {
6868
if (record_type > 1)
6969
return IHX_BAD_RECORD_TYPE;
7070

71-
if (address < USER_CODE_BASE || address > FLASH_SIZE)
71+
if (record_type != IHX_RECORD_EOF && (address < USER_CODE_BASE || address > FLASH_SIZE))
7272
return IHX_BAD_ADDRESS;
7373

7474
sum = 0;

0 commit comments

Comments
 (0)