Skip to content

Commit

Permalink
Ensure CheckpointReader sets num_bytes_read to zero on EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
gibber9809 committed Dec 6, 2024
1 parent 7aff0c6 commit 2ab88fd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/core/src/clp/CheckpointReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 2ab88fd

Please sign in to comment.