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-0dff7051ff02master
parent
219cc8e584
commit
f187b04ee0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue