aboutsummaryrefslogtreecommitdiffstats
path: root/ExpressionCompiler.cpp
diff options
context:
space:
mode:
authorchriseth <c@ethdev.com>2015-03-20 01:15:16 +0800
committerchriseth <c@ethdev.com>2015-03-20 01:15:16 +0800
commitdba9dd1169d0b8a02287434c0499ccc4a16d97bc (patch)
treed878a518d1deffea8b99a78062f2597fcd11caaf /ExpressionCompiler.cpp
parent90c519d08f9de494369d122296ae6a9ca0445dad (diff)
downloaddexon-solidity-dba9dd1169d0b8a02287434c0499ccc4a16d97bc.tar.gz
dexon-solidity-dba9dd1169d0b8a02287434c0499ccc4a16d97bc.tar.zst
dexon-solidity-dba9dd1169d0b8a02287434c0499ccc4a16d97bc.zip
Byte size checked for zero; coding style.
Diffstat (limited to 'ExpressionCompiler.cpp')
-rw-r--r--ExpressionCompiler.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/ExpressionCompiler.cpp b/ExpressionCompiler.cpp
index 144827d4..da762147 100644
--- a/ExpressionCompiler.cpp
+++ b/ExpressionCompiler.cpp
@@ -839,6 +839,7 @@ bool ExpressionCompiler::visit(IndexAccess const& _indexAccess)
// goal:
// <ref> <byte_number> = <base_ref + index / itemsPerSlot> <(index % itemsPerSlot) * byteSize>
unsigned byteSize = arrayType.getBaseType()->getStorageBytes();
+ solAssert(byteSize != 0, "");
unsigned itemsPerSlot = 32 / byteSize;
m_context << u256(itemsPerSlot) << eth::Instruction::SWAP2;
// stack: itemsPerSlot index data_ref