Skip to content

Commit c9b156b

Browse files
committed
Fix faulty logic
1 parent 608dcab commit c9b156b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/io/CompressedInputStream.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,9 +831,12 @@ T DecodingTask<T>::run()
831831
const int to = _ctx.getInt("to", CompressedInputStream::MAX_BLOCK_ID);
832832

833833
// Check if the block must be skipped
834-
if ((blockId < from) || (blockId >= to)) {
834+
if (blockId < from) {
835835
return T(*_data, blockId, 0, 0, 0, "Skipped", true);
836836
}
837+
else if (blockId >= to) {
838+
return T(*_data, blockId, 0, 0, 0, "Success");
839+
}
837840

838841
istreambuf<char> buf(reinterpret_cast<char*>(&_data->_array[0]), streamsize(r));
839842
iostream ios(&buf);

0 commit comments

Comments
 (0)