btcs

bitcoin script parser/evaluator/compiler/decompiler
git clone git://jb55.com/btcs
Log | Files | Refs | README | LICENSE

commit ea37dfd1d6eb809c028c7b4ecfe6180f5ccc36b8
parent 9166df41d0892f915cd386989fb25f4ffda4408e
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 21 Dec 2017 06:45:03 -0800

op_over: copy

Diffstat:
Mscript.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/script.c b/script.c @@ -314,8 +314,8 @@ script_eval(const u8 *script, size_t script_size, struct stack *stack, SCRIPTERR("INVALID_STACK_OPERATION"); struct val v1 = stack_top_val(stack, -4); struct val v2 = stack_top_val(stack, -3); - stack_push_val(stack, v1); - stack_push_val(stack, v2); + stack_push_val(stack, val_copy(v1)); + stack_push_val(stack, val_copy(v2)); } break; @@ -408,7 +408,7 @@ script_eval(const u8 *script, size_t script_size, struct stack *stack, if (stack_size(stack) < 2) SCRIPTERR("INVALID_STACK_OPERATION"); struct val val = stack_top_val(stack, (-2)); - stack_push_val(stack, val); + stack_push_val(stack, val_copy(val)); } break;