Skip to content

Commit

Permalink
Merge pull request #27 from hcarty/serialize-to-string-offset
Browse files Browse the repository at this point in the history
Fix serialization to string in some cases
  • Loading branch information
seliopou authored Sep 1, 2017
2 parents cf5a7f9 + 49f03a0 commit 42944d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/faraday.ml
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ let serialize_to_string t =
let pos = ref 0 in
List.iter (function
| { buffer; off; len } ->
for i = off to len - 1 do
Bytes.unsafe_set bytes (!pos + i) (Bigstring.unsafe_get buffer i)
for i = 0 to len - 1 do
Bytes.unsafe_set bytes (!pos + i) (Bigstring.unsafe_get buffer (off + i))
done;
pos := !pos + len)
iovecs;
Expand Down

0 comments on commit 42944d3

Please sign in to comment.