From e2ab80c3c202387c446ec2498ac7262e60068bb7 Mon Sep 17 00:00:00 2001 From: Juozas Date: Wed, 11 Jul 2018 12:03:48 +0300 Subject: [PATCH] fix parse_arg index out of range in main.go --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 6b51064..3726a03 100644 --- a/main.go +++ b/main.go @@ -68,9 +68,9 @@ func main() { var z Limit x.max = parse_arg(2) - if len(os.Args) >= 3 { + if len(os.Args) > 3 { y.max = parse_arg(3) - if len(os.Args) >= 4 { + if len(os.Args) > 4 { z.max = parse_arg(4) } else { z.max = x.max