btcs

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

commit 802b0f6c341c7a627a079b34a5c4c5785fa19c88
parent 06038df822e747e70fe79198de08b036123fbc50
Author: William Casarin <jb55@jb55.com>
Date:   Thu, 21 Dec 2017 07:38:42 -0800

script: VT_SMALLINT shouldn't ever be on the output stack

Fixes #14

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

diff --git a/script.c b/script.c @@ -118,8 +118,8 @@ script_eval(const u8 *script, size_t script_size, struct stack *stack, const u8 *top = script + script_size; static char tmpbuf[32]; enum opcode opcode; - static const struct val val_true = {.type = VT_SMALLINT, .ind = 1}; - static const struct val val_false = {.type = VT_SMALLINT, .ind = 0}; + struct val val_true = val_from_int(1); + struct val val_false = val_from_int(0); static const struct num bn_one = {.val = 1, .ind = -1}; static const struct num bn_zero = {.val = 0, .ind = -1}; struct val val;