TDBStore: fix bug in sector blank check for variant sized sectors

pull/9370/head
David Saada 2019-01-02 22:32:47 +02:00 committed by adbridge
parent cd53b0afe1
commit 69d57c8e8d
1 changed files with 1 additions and 1 deletions

View File

@ -1409,7 +1409,7 @@ void TDBStore::offset_in_erase_unit(uint8_t area, uint32_t offset,
}
uint32_t agg_offset = 0;
while (bd_offset < agg_offset + _buff_bd->get_erase_size(agg_offset)) {
while (bd_offset >= agg_offset + _buff_bd->get_erase_size(agg_offset)) {
agg_offset += _buff_bd->get_erase_size(agg_offset);
}
offset_from_start = bd_offset - agg_offset;