diff --git a/src/lib/block-io.jl b/src/lib/block-io.jl index c8b0d0074..c498b1d4a 100644 --- a/src/lib/block-io.jl +++ b/src/lib/block-io.jl @@ -11,9 +11,8 @@ struct BlockIO <: IO function find_end_pos(bio::BlockIO, end_byte::Char) seekend(bio) - end_byte = UInt8(end_byte) try - while(!eof(bio.s) && (end_byte != read(bio, UInt8))) continue end + while(!eof(bio.s) && (end_byte != read(bio, Char))) continue end end position(bio.s) end @@ -21,8 +20,7 @@ struct BlockIO <: IO function find_start_pos(bio::BlockIO, end_byte::Char) (bio.r.start == 1) && (return bio.r.start) seekstart(bio) - end_byte = UInt8(end_byte) - !eof(bio.s) && while(end_byte != read(bio, UInt8)) continue end + !eof(bio.s) && while(end_byte != read(bio, Char)) continue end position(bio.s)+1 end