From 23b5b5fa36530eb82543d7d877f8e9e1900232cf Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 4 Jul 2014 13:34:50 +0200 Subject: [PATCH] Length check --- ethutil/script.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethutil/script.go b/ethutil/script.go index aaa0f8ed8..fa05094e7 100644 --- a/ethutil/script.go +++ b/ethutil/script.go @@ -13,7 +13,7 @@ func Compile(script string) (ret []byte, err error) { if len(script) > 2 { line := strings.Split(script, "\n")[0] - if line[0:2] == "#!" { + if len(line) > 1 && line[0:2] == "#!" { switch line { case "#!serpent": byteCode, err := serpent.Compile(script)