Skip to content

Commit

Permalink
input-bugfix: account for offset in termination condition
Browse files Browse the repository at this point in the history
  • Loading branch information
seliopou committed Sep 25, 2019
1 parent 764514a commit 63dd1f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/input.ml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ let count_while t pos ~f =
let off = offset_in_buffer t pos in
let i = ref off in
let len = t.len in
while !i < len && f (Bigstringaf.unsafe_get buffer !i) do
while !i < off + len && f (Bigstringaf.unsafe_get buffer !i) do
incr i
done;
!i - off
Expand Down

0 comments on commit 63dd1f0

Please sign in to comment.