fix handling non-integer arguments to +l
This commit is contained in:
parent
5c43d23dd5
commit
41b7fde963
|
@ -227,7 +227,7 @@ module Parse = struct
|
||||||
begin
|
begin
|
||||||
try match m, arg with
|
try match m, arg with
|
||||||
| `l, `set n ->
|
| `l, `set n ->
|
||||||
let n = int_of_string n in
|
let n = Option.get (int_of_string_opt n) in
|
||||||
if n <= 0 then invalid_arg "limit <= 0";
|
if n <= 0 then invalid_arg "limit <= 0";
|
||||||
{ acc with chan_limit = Some (`set n) }, args
|
{ acc with chan_limit = Some (`set n) }, args
|
||||||
| `l, `unset ->
|
| `l, `unset ->
|
||||||
|
|
Loading…
Reference in New Issue