From db544cb283cee44c6f2815f3e4906d6341ef5b2e Mon Sep 17 00:00:00 2001 From: Andy Piper Date: Mon, 12 Aug 2024 13:07:35 +0100 Subject: [PATCH] AP_Logger: correctly read file header for block logger --- libraries/AP_Logger/AP_Logger_Block.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Logger/AP_Logger_Block.cpp b/libraries/AP_Logger/AP_Logger_Block.cpp index a06e07bcaf..f766a66693 100644 --- a/libraries/AP_Logger/AP_Logger_Block.cpp +++ b/libraries/AP_Logger/AP_Logger_Block.cpp @@ -205,7 +205,7 @@ uint16_t AP_Logger_Block::ReadHeaders() // we are at the start of a file, read the file header if (df_FilePage == 1) { struct FileHeader fh; - BlockRead(0, &fh, sizeof(fh)); + BlockRead(sizeof(ph), &fh, sizeof(fh)); df_FileTime = fh.utc_secs; df_Read_BufferIdx += sizeof(fh); }