Commit 23b5b5fa authored by obscuren's avatar obscuren

Length check

parent d5bcc01e
...@@ -13,7 +13,7 @@ func Compile(script string) (ret []byte, err error) { ...@@ -13,7 +13,7 @@ func Compile(script string) (ret []byte, err error) {
if len(script) > 2 { if len(script) > 2 {
line := strings.Split(script, "\n")[0] line := strings.Split(script, "\n")[0]
if line[0:2] == "#!" { if len(line) > 1 && line[0:2] == "#!" {
switch line { switch line {
case "#!serpent": case "#!serpent":
byteCode, err := serpent.Compile(script) byteCode, err := serpent.Compile(script)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment