mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/driver-w25qxxx.git
synced 2025-09-28 16:37:33 +00:00
Fixed a integer overflow
This commit is contained in:
@@ -147,7 +147,8 @@ namespace sta
|
||||
while (left <= right)
|
||||
{
|
||||
middle = (left + right) / 2;
|
||||
uint32_t sector = ((middle * (sizeof(T)+1)) / W25QXX_SECTOR_SIZE);
|
||||
uint32_t address = middle * (sizeof(T)+1);
|
||||
uint32_t sector = (sector / W25QXX_SECTOR_SIZE);
|
||||
flash_->sectorErase(sector * W25QXX_SECTOR_SIZE, true);
|
||||
|
||||
right = middle;
|
||||
|
Reference in New Issue
Block a user