pkg/vm: fix error handling in XDROP()

Found by GolangCI:
  Error return value of ctx.Estack.Remove is not checked (from errcheck)
  nilness: impossible condition: nil != nil (from govet)
This commit is contained in:
Roman Khimov 2019-08-12 16:40:19 +03:00
parent 06f9e1d123
commit 3bc195659a

View file

@ -291,7 +291,7 @@ func XDROP(op stack.Instruction, ctx *stack.Context, istack *stack.Invocation, r
return FAULT, err
}
ctx.Estack.Remove(uint16(n.Value().Uint64()))
_, err = ctx.Estack.Remove(uint16(n.Value().Uint64()))
if err != nil {
return FAULT, err
}