From c514fbccc036faafef995d422a74dbe5630e7e00 Mon Sep 17 00:00:00 2001 From: dm4 Date: Thu, 19 Apr 2018 21:31:30 +0800 Subject: [PATCH] core/asm: accept uppercase instructions (#16531) --- core/asm/compiler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/asm/compiler.go b/core/asm/compiler.go index e2130957c..c273e7c51 100644 --- a/core/asm/compiler.go +++ b/core/asm/compiler.go @@ -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