aboutsummaryrefslogtreecommitdiffstats
path: root/vm/closure.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-02 03:49:56 +0800
committerobscuren <geffobscura@gmail.com>2014-12-02 03:49:56 +0800
commita22056db5988bfa2b1354e0092eabb734c30701c (patch)
tree3f85f85c7bf80422262c5c521e883aeb358dadc0 /vm/closure.go
parentbeb7d35c4033063e4111a51ebf88fabb43bc22b8 (diff)
downloadgo-tangerine-a22056db5988bfa2b1354e0092eabb734c30701c.tar.gz
go-tangerine-a22056db5988bfa2b1354e0092eabb734c30701c.tar.zst
go-tangerine-a22056db5988bfa2b1354e0092eabb734c30701c.zip
Make an attempt to pay for the gas prior to expanding the mem.
Diffstat (limited to 'vm/closure.go')
-rw-r--r--vm/closure.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm/closure.go b/vm/closure.go
index ef9bbca93..5bd8c1bb8 100644
--- a/vm/closure.go
+++ b/vm/closure.go
@@ -64,7 +64,7 @@ func (c *Closure) GetOp(x int) OpCode {
}
func (c *Closure) GetByte(x int) byte {
- if x < len(c.Code) {
+ if x > -1 && x < len(c.Code) {
return c.Code[x]
}