Correction d'un bug lors de la lecture de l'entrée standard

This commit is contained in:
Adrien Vannson 2022-05-08 18:14:13 +02:00
parent 15afcecabe
commit a5d820319a
No known key found for this signature in database
GPG Key ID: FE2E66FD978C1A55

View File

@ -24,9 +24,7 @@ let readline () = match file with
| None -> ( | None -> (
Printf.printf ">>> "; Printf.printf ">>> ";
flush stdout; flush stdout;
let line = ref "" in read_line ()
Scanf.scanf "%s" (fun s -> line := s);
!line
) )
| Some f -> input_line f | Some f -> input_line f
in in