From 2756dab0b0250dbf0dd23e5745d2e092749befcf Mon Sep 17 00:00:00 2001 From: k1574 Date: Mon, 7 Dec 2020 09:27:39 +0500 Subject: [PATCH] tmpl: fixed wrong arguments handling. --- tmpl/tmpl.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tmpl/tmpl.go b/tmpl/tmpl.go index d205470..5e48822 100644 --- a/tmpl/tmpl.go +++ b/tmpl/tmpl.go @@ -25,8 +25,8 @@ Run(args []string) int { status = 0 delim = '\n' arg0 = args[0] - - if len(args[1]) != len(args)-2 { + + if len(args)<3 || len(args[1]) != len(args)-2 { usage() }