From ccfeebf91784ab34f3aacaf495c59667b9ec98b6 Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Sat, 5 Nov 2022 15:16:59 +0100 Subject: Use open_in_bin instead of open_in. On platforms that do distinguish between text mode and binary mode, seek_in cannot reliably be used on files opened in text mode (open_in). The input file must therefore be opened in binary mode (open_in_bin). Bug 34075 --- lib/Printlines.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Printlines.ml b/lib/Printlines.ml index 135672cc..b60fdf4a 100644 --- a/lib/Printlines.ml +++ b/lib/Printlines.ml @@ -25,7 +25,7 @@ type filebuf = { the first character of line number [b.lineno]. *) let openfile f = - { chan = open_in f; + { chan = open_in_bin f; lineno = 1 } let close b = -- cgit