diff --git a/octa/stream.hh b/octa/stream.hh index e02a603..b02ab1a 100644 --- a/octa/stream.hh +++ b/octa/stream.hh @@ -68,7 +68,7 @@ struct StreamRange: InputRange< StreamRange(const StreamRange &r): p_stream(r.p_stream), p_size(r.p_size) {} bool empty() const { - return p_stream->tell() == p_size; + return (p_size - p_stream->tell()) < StreamOffset(sizeof(T)); } bool pop_front() {