Skip to content

Commit

Permalink
Have OP_DUP match the C++ impl more closely
Browse files Browse the repository at this point in the history
  • Loading branch information
sellout committed Feb 6, 2025
1 parent 9ab8426 commit 0e99b6a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,9 +777,8 @@ pub fn eval_script(
return set_error(ScriptError::InvalidStackOperation);
}

let a = stack.pop()?;
stack.push_back(a.clone());
stack.push_back(a);
let vch = stack.top(-1)?;
stack.push_back(vch.clone());
}

OP_NIP => {
Expand Down

0 comments on commit 0e99b6a

Please sign in to comment.