parent
4db5ef05f8
commit
663afbe4df
1 changed files with 3 additions and 0 deletions
|
@ -19,6 +19,9 @@ import (
|
||||||
func LoadToken(ic *interop.Context) func(id int32) error {
|
func LoadToken(ic *interop.Context) func(id int32) error {
|
||||||
return func(id int32) error {
|
return func(id int32) error {
|
||||||
ctx := ic.VM.Context()
|
ctx := ic.VM.Context()
|
||||||
|
if !ctx.GetCallFlags().Has(callflag.ReadStates | callflag.AllowCall) {
|
||||||
|
return errors.New("invalid call flags")
|
||||||
|
}
|
||||||
tok := ctx.NEF.Tokens[id]
|
tok := ctx.NEF.Tokens[id]
|
||||||
if int(tok.ParamCount) > ctx.Estack().Len() {
|
if int(tok.ParamCount) > ctx.Estack().Len() {
|
||||||
return errors.New("stack is too small")
|
return errors.New("stack is too small")
|
||||||
|
|
Loading…
Add table
Reference in a new issue