AP_Logger: fix AP_Logger_Block::get_num_logs()

This commit is contained in:
Michel Pastor 2019-10-03 16:56:34 +02:00 committed by Andrew Tridgell
parent 5a0fe4e322
commit 49bf0a3057
1 changed files with 1 additions and 1 deletions

View File

@ -344,7 +344,7 @@ uint16_t AP_Logger_Block::get_num_logs(void)
last = GetFileNumber();
StartRead(lastpage + 2);
if (GetFileNumber() == 0xFFFF) {
StartRead(((lastpage >> 8) + 1) << 8); // next sector
StartRead(((((lastpage-1)>>8)+1)<<8)+1); // next sector
}
first = GetFileNumber();
if (first > last) {