Skip to content

Commit

Permalink
missing checkopen
Browse files Browse the repository at this point in the history
  • Loading branch information
stevengj committed Jul 12, 2023
1 parent 271af03 commit 8073eb4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/bufferedinputstream.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ end
if isdefined(Base, :copyuntil) # julia#48273 in Julia 1.11
# optimized copyuntil using findnext on the buffer:
function Base.copyuntil(out::IO, stream::BufferedInputStream, delim::UInt8; keep::Bool=false)
checkopen(stream)
@views @inbounds while ensurebuffered!(stream, 1)
p = findnext(==(delim), stream.buffer[1:stream.available], stream.position)
if isnothing(p)
Expand Down

0 comments on commit 8073eb4

Please sign in to comment.