Skip to content

Commit

Permalink
core/asm: accept uppercase instructions (ethereum#16531)
Browse files Browse the repository at this point in the history
  • Loading branch information
dm4 authored and sunfinite committed Aug 9, 2018
1 parent f2d3a5c commit 71429df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/asm/compiler.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ func (c *Compiler) pushBin(v interface{}) {
// isPush returns whether the string op is either any of
// push(N).
func isPush(op string) bool {
return op == "push"
return strings.ToUpper(op) == "PUSH"
}

// isJump returns whether the string op is jump(i)
func isJump(op string) bool {
return op == "jumpi" || op == "jump"
return strings.ToUpper(op) == "JUMPI" || strings.ToUpper(op) == "JUMP"
}

// toBinary converts text to a vm.OpCode
Expand Down

0 comments on commit 71429df

Please sign in to comment.