Skip to content

Commit

Permalink
Apply analogous fix to 1064f4d for little endian
Browse files Browse the repository at this point in the history
  • Loading branch information
andrenth committed Jun 6, 2018
1 parent a5211c7 commit e1366f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bytes_conv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module Make (I : IntSig) = struct
let rec loop buffer i n =
if i = (I.bits / 8) then ()
else
let b = Char.chr (I.to_int (I.logand (I.of_int 0xFF) n)) in
let b = Char.unsafe_chr (I.to_int (I.logand (I.of_int 0xFF) n)) in
let () = Bytes.set buffer (offset + i) b in
let n' = I.shift_right_logical n 8 in
loop buffer (i + 1) n'
Expand Down

0 comments on commit e1366f2

Please sign in to comment.