aboutsummaryrefslogtreecommitdiffstats
path: root/LValue.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-13 20:14:51 +0800
committerchriseth <c@ethdev.com>2015-03-14 00:31:56 +0800
commita16677dcfbd7fd7d42fbd6166e234b1b7001ec59 (patch)
tree2a885476ca571246df3615f4fcd79e3c74353879 /LValue.cpp
parent039b133c180b15863ee3104637c97822d815d932 (diff)
downloaddexon-solidity-a16677dcfbd7fd7d42fbd6166e234b1b7001ec59.tar.gz
dexon-solidity-a16677dcfbd7fd7d42fbd6166e234b1b7001ec59.tar.zst
dexon-solidity-a16677dcfbd7fd7d42fbd6166e234b1b7001ec59.zip
Fix gas for builtin.
Fixes #1300
Diffstat (limited to 'LValue.cpp')
-rw-r--r--LValue.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/LValue.cpp b/LValue.cpp
index a56ed54c..68d6797e 100644
--- a/LValue.cpp
+++ b/LValue.cpp
@@ -167,6 +167,7 @@ void StorageItem::storeValue(Type const& _sourceType, SourceLocation const& _loc
// stack: source_ref target_ref member_offset source_member_ref
StorageItem(m_context, *memberType).retrieveValue(_location, true);
// stack: source_ref target_ref member_offset source_value...
+ solAssert(2 + memberType->getSizeOnStack() <= 16, "Stack too deep.");
m_context << eth::dupInstruction(2 + memberType->getSizeOnStack())
<< eth::dupInstruction(2 + memberType->getSizeOnStack()) << eth::Instruction::ADD;
// stack: source_ref target_ref member_offset source_value... target_member_ref