From 2ab88fdd645c10aaae1c65475c74b077498b39bc Mon Sep 17 00:00:00 2001 From: gibber9809 Date: Fri, 6 Dec 2024 18:47:07 +0000 Subject: [PATCH] Ensure CheckpointReader sets num_bytes_read to zero on EOF --- components/core/src/clp/CheckpointReader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/components/core/src/clp/CheckpointReader.cpp b/components/core/src/clp/CheckpointReader.cpp index 4e2fdd606..20a1472c3 100644 --- a/components/core/src/clp/CheckpointReader.cpp +++ b/components/core/src/clp/CheckpointReader.cpp @@ -15,6 +15,7 @@ auto CheckpointReader::try_seek_from_begin(size_t pos) -> ErrorCode { auto CheckpointReader::try_read(char* buf, size_t num_bytes_to_read, size_t& num_bytes_read) -> ErrorCode { if (m_cur_pos == m_checkpoint) { + num_bytes_read = 0; return ErrorCode_EndOfFile; }