Skip to content

Commit 0752918

Browse files
dm4mariameda
authored andcommitted
core/asm: accept uppercase instructions (ethereum#16531)
1 parent e53df0a commit 0752918

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/asm/compiler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,12 @@ func (c *Compiler) pushBin(v interface{}) {
236236
// isPush returns whether the string op is either any of
237237
// push(N).
238238
func isPush(op string) bool {
239-
return op == "push"
239+
return strings.ToUpper(op) == "PUSH"
240240
}
241241

242242
// isJump returns whether the string op is jump(i)
243243
func isJump(op string) bool {
244-
return op == "jumpi" || op == "jump"
244+
return strings.ToUpper(op) == "JUMPI" || strings.ToUpper(op) == "JUMP"
245245
}
246246

247247
// toBinary converts text to a vm.OpCode

0 commit comments

Comments
 (0)