Make an attempt to pay for the gas prior to expanding the mem.

This commit is contained in:
obscuren
2014-12-01 20:49:56 +01:00
parent beb7d35c40
commit a22056db59
3 changed files with 7 additions and 3 deletions

View File

@ -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]
}