aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen
diff options
context:
space:
mode:
authorYoichi Hirai <i@yoichihirai.com>2017-03-04 01:25:50 +0800
committerGitHub <noreply@github.com>2017-03-04 01:25:50 +0800
commitcfbbd89dafca57e450f6b4433eb258e6a7f52310 (patch)
tree52a31928bfbe1c32ada53ec1008438a931cb2c98 /libsolidity/codegen
parent6bfd894f46d12f78e2ea49a58f96763a077bcf49 (diff)
parent4b1e8111cc2469808d08e1718d3edd64b2cc4484 (diff)
downloaddexon-solidity-cfbbd89dafca57e450f6b4433eb258e6a7f52310.tar.gz
dexon-solidity-cfbbd89dafca57e450f6b4433eb258e6a7f52310.tar.zst
dexon-solidity-cfbbd89dafca57e450f6b4433eb258e6a7f52310.zip
Merge pull request #1702 from ethereum/assertError
Change effect of assert to invalid opcode.
Diffstat (limited to 'libsolidity/codegen')
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index aac4c0c6..5192ffa6 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -885,9 +885,8 @@ bool ExpressionCompiler::visit(FunctionCall const& _functionCall)
// jump if condition was met
m_context << Instruction::ISZERO << Instruction::ISZERO;
auto success = m_context.appendConditionalJump();
- // condition was not met, abort
- m_context << u256(0) << u256(0);
- m_context << Instruction::REVERT;
+ // condition was not met, flag an error
+ m_context << Instruction::INVALID;
// the success branch
m_context << success;
break;