mirror of
https://git.intern.spaceteamaachen.de/ALPAKA/driver-w25qxxx.git
synced 2025-06-10 02:26:00 +00:00
Fixed a integer overflow
This commit is contained in:
parent
80fed4bc44
commit
29482e94ff
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user