From 7cb1f2656c67e0443c1b41382b7b06218420a05d Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 10 Jan 2024 12:16:40 -0500 Subject: [PATCH] fix: do not use private Bytes function --- src/fuchsia/write/buf.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fuchsia/write/buf.ml b/src/fuchsia/write/buf.ml index 52ac55a..b2aae8a 100644 --- a/src/fuchsia/write/buf.ml +++ b/src/fuchsia/write/buf.ml @@ -29,8 +29,7 @@ let[@inline] add_string (self : t) (s : string) : unit = let missing = missing_to_round len in (* bound check *) - assert (len + missing + self.offset <= Bytes.length self.buf); - Bytes.unsafe_blit_string s 0 self.buf self.offset len; + Bytes.blit_string s 0 self.buf self.offset len; self.offset <- self.offset + len; (* add 0-padding *)