diff --git a/main/opcodes/create-terminate-context.zkasm b/main/opcodes/create-terminate-context.zkasm index 8d2c2d7d..6c39194e 100644 --- a/main/opcodes/create-terminate-context.zkasm +++ b/main/opcodes/create-terminate-context.zkasm @@ -991,15 +991,17 @@ opREVERT: $ => D :MLOAD(retCallLength) C => A D => B - $ :LT,JMPC(opREVERT32) + $ :LT,JMPC(preREVERT32) D => C ; copy from memory current CTX to memory origin CTX +preREVERT32: + $ => B :MLOAD(retCallOffset) + opREVERT32: ; checks zk-counters %MAX_CNT_STEPS - STEP - 400 :JMPN(outOfCountersStep) - $ => B :MLOAD(retCallOffset) C - 1 :JMPN(opREVERTend) C - 32 :JMPN(opREVERTfinal) ; load first 32 bytes from memory at current CTX