diff --git a/src/lib/block-io.jl b/src/lib/block-io.jl index 3521195c7..1a10cdedc 100644 --- a/src/lib/block-io.jl +++ b/src/lib/block-io.jl @@ -12,14 +12,15 @@ struct BlockIO <: IO function find_end_pos(bio::BlockIO, end_byte::Char) seekend(bio) 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 + function find_start_pos(bio::BlockIO, end_byte::Char) (bio.r.start == 1) && (return bio.r.start) seekstart(bio) - !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