From a6bcb609cea9861fc16f57d93e4887f9c914b2b7 Mon Sep 17 00:00:00 2001 From: malc Date: Wed, 26 Aug 2015 18:14:12 +0300 Subject: [PATCH] Simplify code involving subbytes --- main.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.ml b/main.ml index 3d1c62c..88a1b6f 100644 --- a/main.ml +++ b/main.ml @@ -6733,12 +6733,12 @@ let () = let n = tempfailureretry (Unix.read fd s 0) 80 in if conf.redirectstderr then ( - Buffer.add_substring state.errmsgs (Bytes.to_string s) 0 n; + Buffer.add_subbytes state.errmsgs s 0 n; state.newerrmsgs <- true; state.redisplay <- true; ) else ( - prerr_string (String.sub (Bytes.to_string s) 0 n); + prerr_string @@ Bytes.sub_string s 0 n; flush stderr; ); checkfds rest -- 2.11.4.GIT