aboutsummaryrefslogtreecommitdiffstats
path: root/vm/closure.go
diff options
context:
space:
mode:
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]
}