From 55448e17aa289352ce2bc4f1567fd1d746fbb656 Mon Sep 17 00:00:00 2001 From: zkronos73 Date: Thu, 15 Dec 2022 12:12:44 +0000 Subject: [PATCH 1/2] fix bug on jmpnz and jmpnc --- package.json | 2 +- src/zkasm_parser.jison | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index f606def..2ce3321 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@0xpolygonhermez/zkasmcom", - "version": "0.0.18", + "version": "0.0.19", "bin": { "zkasm": "src/zkasm.js" }, diff --git a/src/zkasm_parser.jison b/src/zkasm_parser.jison index 23ed8e6..a8cab27 100644 --- a/src/zkasm_parser.jison +++ b/src/zkasm_parser.jison @@ -554,7 +554,7 @@ op } | jmpNotCond '(' IDENTIFIER ',' IDENTIFIER ')' { - $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: 'next', elseAddr: $3 } + $$ = { [$1]: 1, useJmpAddr: 1, jmpAddr: $5, elseAddr: $3 } } | JMP '(' RR ')' { From 30064b488c469d8742abbfb5cd64727c39063297 Mon Sep 17 00:00:00 2001 From: zkronos73 Date: Thu, 15 Dec 2022 12:22:13 +0000 Subject: [PATCH 2/2] update build --- build/zkasm_parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/zkasm_parser.js b/build/zkasm_parser.js index 1b970a9..836b4e7 100644 --- a/build/zkasm_parser.js +++ b/build/zkasm_parser.js @@ -371,7 +371,7 @@ case 83: break; case 84: - this.$ = { [$$[$0-5]]: 1, useJmpAddr: 1, jmpAddr: 'next', elseAddr: $$[$0-3] } + this.$ = { [$$[$0-5]]: 1, useJmpAddr: 1, jmpAddr: $$[$0-1], elseAddr: $$[$0-3] } break; case 85: