DataFlash: return number of logs as zero correctly

when we have no file based logs, report no logs :)
This commit is contained in:
Andrew Tridgell 2014-03-11 17:11:58 +11:00
parent d9e8c34a89
commit ecdd74d580
1 changed files with 1 additions and 1 deletions

View File

@ -356,7 +356,7 @@ uint16_t DataFlash_File::get_num_logs(void)
{
uint16_t ret;
uint16_t high = find_last_log();
for (ret=1; ret<high; ret++) {
for (ret=0; ret<high; ret++) {
if (_get_log_size(high - ret) <= 0) {
break;
}