diff options
author | Wim <wim@42.be> | 2022-11-27 00:42:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-27 00:42:16 +0100 |
commit | 4fd0a7672777f0ed15692ae2ba47838208537558 (patch) | |
tree | b119834a8b9ee78aa8f1b2ad05efa7da50516cbf /vendor/github.com/d5 | |
parent | 6da9d567dc9195e9a5211f23a6795a41f56a1bfc (diff) | |
download | matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.gz matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.bz2 matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.zip |
Update dependencies (#1929)
Diffstat (limited to 'vendor/github.com/d5')
-rw-r--r-- | vendor/github.com/d5/tengo/v2/script.go | 2 | ||||
-rw-r--r-- | vendor/github.com/d5/tengo/v2/vm.go | 21 |
2 files changed, 12 insertions, 11 deletions
diff --git a/vendor/github.com/d5/tengo/v2/script.go b/vendor/github.com/d5/tengo/v2/script.go index 82b02f52..4cca4d04 100644 --- a/vendor/github.com/d5/tengo/v2/script.go +++ b/vendor/github.com/d5/tengo/v2/script.go @@ -259,7 +259,7 @@ func (c *Compiled) Clone() *Compiled { // copy global objects for idx, g := range c.globals { if g != nil { - clone.globals[idx] = g + clone.globals[idx] = g.Copy() } } return clone diff --git a/vendor/github.com/d5/tengo/v2/vm.go b/vendor/github.com/d5/tengo/v2/vm.go index c8365252..64bd23bc 100644 --- a/vendor/github.com/d5/tengo/v2/vm.go +++ b/vendor/github.com/d5/tengo/v2/vm.go @@ -376,8 +376,8 @@ func (v *VM) run() { var lowIdx int64 if low != UndefinedValue { - if low, ok := low.(*Int); ok { - lowIdx = low.Value + if lowInt, ok := low.(*Int); ok { + lowIdx = lowInt.Value } else { v.err = fmt.Errorf("invalid slice index type: %s", low.TypeName()) @@ -391,8 +391,8 @@ func (v *VM) run() { var highIdx int64 if high == UndefinedValue { highIdx = numElements - } else if high, ok := high.(*Int); ok { - highIdx = high.Value + } else if highInt, ok := high.(*Int); ok { + highIdx = highInt.Value } else { v.err = fmt.Errorf("invalid slice index type: %s", high.TypeName()) @@ -428,8 +428,8 @@ func (v *VM) run() { var highIdx int64 if high == UndefinedValue { highIdx = numElements - } else if high, ok := high.(*Int); ok { - highIdx = high.Value + } else if highInt, ok := high.(*Int); ok { + highIdx = highInt.Value } else { v.err = fmt.Errorf("invalid slice index type: %s", high.TypeName()) @@ -465,8 +465,8 @@ func (v *VM) run() { var highIdx int64 if high == UndefinedValue { highIdx = numElements - } else if high, ok := high.(*Int); ok { - highIdx = high.Value + } else if highInt, ok := high.(*Int); ok { + highIdx = highInt.Value } else { v.err = fmt.Errorf("invalid slice index type: %s", high.TypeName()) @@ -502,8 +502,8 @@ func (v *VM) run() { var highIdx int64 if high == UndefinedValue { highIdx = numElements - } else if high, ok := high.(*Int); ok { - highIdx = high.Value + } else if highInt, ok := high.(*Int); ok { + highIdx = highInt.Value } else { v.err = fmt.Errorf("invalid slice index type: %s", high.TypeName()) @@ -767,6 +767,7 @@ func (v *VM) run() { NumLocals: fn.NumLocals, NumParameters: fn.NumParameters, VarArgs: fn.VarArgs, + SourceMap: fn.SourceMap, Free: free, } v.allocs-- |