From 030a09159b0eac3ea7dc1f7d3ad5c5a3d8ef74a4 Mon Sep 17 00:00:00 2001
From: Hao Tan <45457672+e0c9@users.noreply.github.com>
Date: Sat, 26 Mar 2022 19:09:38 +0800
Subject: [PATCH] Fix skipping the trailer

---
 db/log_reader.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/db/log_reader.cc b/db/log_reader.cc
index 9880279..97b2bd8 100644
--- a/db/log_reader.cc
+++ b/db/log_reader.cc
@@ -35,7 +35,7 @@ bool Reader::SkipToInitialBlock() {
   uint64_t block_start_location = initial_offset_ - offset_in_block;
 
   // Don't search a block if we'd be in the trailer
-  if (offset_in_block > kBlockSize - 6) {
+  if (offset_in_block >= kBlockSize - 6) {
     block_start_location += kBlockSize;
   }