diff --git a/main/opcodes/stack-operations.zkasm b/main/opcodes/stack-operations.zkasm index 9741b1d3..c0006c00 100644 --- a/main/opcodes/stack-operations.zkasm +++ b/main/opcodes/stack-operations.zkasm @@ -233,10 +233,10 @@ opDUP1: GAS - %GAS_FASTEST_STEP => GAS :JMPN(outOfGas) $ => A :MLOAD(SP-1); [value => A] - ; check stack overflow - %CALLDATA_OFFSET - SP :JMPN(stackOverflow) + ; store duplicated value A :MSTORE(SP++); [duplicated_value(A) => SP] + ; check stack overflow %CALLDATA_OFFSET - SP :JMPN(stackOverflow, readCode)