mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-21 23:33:57 -04:00
SITL: fixed limits on storage
This commit is contained in:
parent
984064f3d3
commit
a70b195a4a
@ -20,7 +20,7 @@ void SITLEEPROMStorage::_eeprom_open(void)
|
||||
|
||||
void SITLEEPROMStorage::read_block(void *dst, uint16_t src, size_t n)
|
||||
{
|
||||
assert(src < HAL_STORAGE_SIZE && src + n < HAL_STORAGE_SIZE);
|
||||
assert(src < HAL_STORAGE_SIZE && src + n <= HAL_STORAGE_SIZE);
|
||||
_eeprom_open();
|
||||
assert(pread(_eeprom_fd, dst, n, src) == (ssize_t)n);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user