This is an automated email from the ASF dual-hosted git repository.

andk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git


The following commit(s) were added to refs/heads/master by this push:
     new cd59fbc64 sys/log: Fix reading latest entry from fcb_log
cd59fbc64 is described below

commit cd59fbc642875392fcc90782893e2f83ed36710f
Author: Andrzej Kaczmarek <[email protected]>
AuthorDate: Wed Nov 27 12:57:11 2024 +0100

    sys/log: Fix reading latest entry from fcb_log
---
 sys/log/full/src/log_fcb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/log/full/src/log_fcb.c b/sys/log/full/src/log_fcb.c
index 0099462ed..12b8cb060 100644
--- a/sys/log/full/src/log_fcb.c
+++ b/sys/log/full/src/log_fcb.c
@@ -149,7 +149,8 @@ log_fcb_find_gte(struct log *log, struct log_offset 
*log_offset,
      * if timestamp for request is < 0, return last log entry
      */
     if (log_offset->lo_ts < 0) {
-        out_entry->fe_step_back = false;
+        *out_entry = fcb->f_active;
+        out_entry->fe_step_back = true;
         return 0;
     }
 

Reply via email to