aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/codegen
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2017-02-16 22:49:59 +0800
committerchriseth <c@ethdev.com>2017-02-16 22:54:17 +0800
commit811bb770c51bc63f9ccb2bff014482ba9c760132 (patch)
tree5c2569da54577708b95544f8719e0beeeeac8f63 /libsolidity/codegen
parentad751bd3e6f22fadc01d43610ec2e2e008c32f11 (diff)
downloaddexon-solidity-811bb770c51bc63f9ccb2bff014482ba9c760132.tar
dexon-solidity-811bb770c51bc63f9ccb2bff014482ba9c760132.tar.gz
dexon-solidity-811bb770c51bc63f9ccb2bff014482ba9c760132.tar.bz2
dexon-solidity-811bb770c51bc63f9ccb2bff014482ba9c760132.tar.lz
dexon-solidity-811bb770c51bc63f9ccb2bff014482ba9c760132.tar.xz
dexon-solidity-811bb770c51bc63f9ccb2bff014482ba9c760132.tar.zst
dexon-solidity-811bb770c51bc63f9ccb2bff014482ba9c760132.zip
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 2ed19a83..41cfcb69 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -875,9 +875,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;