Make fallback function throw by default.

This commit is contained in:
chriseth
2016-08-30 15:31:50 +02:00
parent cf974fd103
commit 4bfe09897e
4 changed files with 6 additions and 5 deletions
+1 -4
View File
@@ -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)
{