compiler: compile appcall with dynamic argument

Closes #1160
This commit is contained in:
Anna Shaleva 2020-07-08 17:37:42 +03:00
parent cf1e5243b9
commit 56a5c9db11
2 changed files with 20 additions and 1 deletions

View file

@ -1216,7 +1216,7 @@ func (c *codegen) convertBuiltin(expr *ast.CallExpr) {
case "AppCall":
c.emitReverse(len(expr.Args))
buf := c.getByteArray(expr.Args[0])
if len(buf) != 20 {
if buf != nil && len(buf) != 20 {
c.prog.Err = errors.New("invalid script hash")
}
emit.Syscall(c.prog.BinWriter, "System.Contract.Call")