btcs

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

commit 679507900ae8bbf716757186c90a4b205302758d
parent b4810b8eb9b8932911de5845aca6fc15eca2aaac
Author: William Casarin <jb55@jb55.com>
Date:   Wed, 19 Jun 2019 00:08:00 -0700

fix failed to decompile on arg every time

Diffstat:
Mmain.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/main.c b/main.c @@ -224,7 +224,12 @@ int main(int argc, const char *argv[]) if (!ok) fail(4, "failed to read input arg (too big?)"); - decompile((const char *)buf, written, abbrev_data); + ok = decompile((const char *)buf, written, abbrev_data); + + if (!ok) { + fprintf(stderr, "failed to decompile\n"); + failed = true; + } } if (failed)