From 8c982a54034e510b13aa46f73ff12d005dc59221 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Thu, 10 Apr 2014 14:59:52 -0400 Subject: [PATCH] Fix AND and OR. --- libethereum/Instruction.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libethereum/Instruction.cpp b/libethereum/Instruction.cpp index 94ea49df4..34e3f1b56 100644 --- a/libethereum/Instruction.cpp +++ b/libethereum/Instruction.cpp @@ -757,13 +757,11 @@ static int compileLispFragment(char const*& d, char const* e, bool _quiet, bytes { codes.resize(codes.size() + 1); locs.resize(locs.size() + 1); - { - int o = compileLispFragment(d, e, _quiet, codes.back(), locs.back(), _vars); - if (o != 1) - return false; - } - if (compileLispFragment(d, e, _quiet, codes.back(), locs.back(), _vars) != -1) + int o = compileLispFragment(d, e, _quiet, codes.back(), locs.back(), _vars); + if (o == -1) break; + if (o != 1) + return false; } // last one is empty. @@ -814,6 +812,8 @@ static int compileLispFragment(char const*& d, char const* e, bool _quiet, bytes locs.resize(locs.size() + 1); { int o = compileLispFragment(d, e, _quiet, codes.back(), locs.back(), _vars); + if (o == -1) + break; if (o != 1) return false; }