aboutsummaryrefslogtreecommitdiffstats
path: root/Compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Compiler.cpp')
-rw-r--r--Compiler.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Compiler.cpp b/Compiler.cpp
index 950b1e75..b2b8bfa4 100644
--- a/Compiler.cpp
+++ b/Compiler.cpp
@@ -298,7 +298,10 @@ void Compiler::appendReturnValuePacker(TypePointers const& _typeParameters)
stackDepth -= type->getSizeOnStack();
}
// note that the stack is not cleaned up here
- m_context << u256(dataOffset) << u256(0) << eth::Instruction::RETURN;
+ if (dataOffset == 0)
+ m_context << eth::Instruction::STOP;
+ else
+ m_context << u256(dataOffset) << u256(0) << eth::Instruction::RETURN;
}
void Compiler::registerStateVariables(ContractDefinition const& _contract)