mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ion/external_flash] Fix SectorAtAddress assert()
This commit is contained in:
@@ -405,7 +405,7 @@ int SectorAtAddress(uint32_t address) {
|
||||
i = address >> NumberOfAddressBitsIn32KbyteBlock;
|
||||
if (i >= 1) {
|
||||
i = Config::NumberOf4KSectors + i - 1;
|
||||
assert(i >= 0 && i <= Config::NumberOf32KSectors);
|
||||
assert(i >= Config::NumberOf4KSectors && i <= Config::NumberOf4KSectors + Config::NumberOf32KSectors);
|
||||
return i;
|
||||
}
|
||||
i = address >> NumberOfAddressBitsIn4KbyteBlock;
|
||||
|
||||
Reference in New Issue
Block a user