Parsing of float arguments was not properly handled in case of invalid

argument.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4550 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Pierre Weis 2002-03-21 10:45:20 +00:00
parent 219cc8e584
commit f187b04ee0
1 changed files with 3 additions and 1 deletions

View File

@ -100,7 +100,9 @@ let parse speclist anonfun errmsg =
incr current;
| Float f when !current + 1 < l ->
let arg = Sys.argv.(!current+1) in
f (float_of_string arg);
begin try f (float_of_string arg);
with Failure "float_of_string" -> stop (Wrong (s, arg, "a float"))
end;
incr current;
| Rest f ->
while !current < l-1 do