From 4bfe09897e3346038b95eb10d74dd0d8c9a8f40e Mon Sep 17 00:00:00 2001 From: chriseth Date: Thu, 25 Aug 2016 23:53:03 +0200 Subject: Make fallback function throw by default. --- libsolidity/codegen/ContractCompiler.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'libsolidity/codegen/ContractCompiler.cpp') diff --git a/libsolidity/codegen/ContractCompiler.cpp b/libsolidity/codegen/ContractCompiler.cpp index 715852be..9d77ccdc 100644 --- a/libsolidity/codegen/ContractCompiler.cpp +++ b/libsolidity/codegen/ContractCompiler.cpp @@ -247,11 +247,8 @@ void ContractCompiler::appendFunctionSelector(ContractDefinition const& _contrac m_context << returnTag; appendReturnValuePacker(FunctionType(*fallback).returnParameterTypes(), _contract.isLibrary()); } - else if (_contract.isLibrary()) - // Reject invalid library calls and ether sent to a library. - m_context.appendJumpTo(m_context.errorTag()); else - m_context << Instruction::STOP; // function not found + m_context.appendJumpTo(m_context.errorTag()); for (auto const& it: interfaceFunctions) { -- cgit v1.2.3