mirror of
https://github.com/marqs85/ossc.git
synced 2025-01-15 15:30:04 +00:00
altera_epcq_controller_mod.c: Fix faulty read/write end address check.
In the Flash info structure, the field containing the end address of the Flash storage is documented to be non-inclusive. However, when this field is compared to the end address of a read or write, which is also non-inclusive, it is considered an error that these two values match, which is incorrect, as this would error out on an attempt to fully read/write the last page. Fix this by simply changing the >= comparison into a > one.
This commit is contained in:
parent
af1f8a20d4
commit
0b495b234c
@ -736,7 +736,7 @@ ALT_INLINE alt_32 static alt_epcq_validate_read_write_arguments
|
||||
/* make sure start and end address is less then the end address of the flash */
|
||||
if(
|
||||
start_address >= epcq_flash_info->data_end ||
|
||||
end_address >= epcq_flash_info->data_end ||
|
||||
end_address > epcq_flash_info->data_end ||
|
||||
offset < 0 ||
|
||||
length < 0
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user