Makes array length access read-only.

This commit is contained in:
Erik Kundt
2019-11-19 16:09:21 +01:00
parent 94272d44aa
commit ecaed1030f
9 changed files with 13 additions and 143 deletions
+2 -1
View File
@@ -1565,7 +1565,8 @@ bool ExpressionCompiler::visit(MemberAccess const& _memberAccess)
m_context << Instruction::SWAP1 << Instruction::POP;
break;
case DataLocation::Storage:
setLValue<StorageArrayLength>(_memberAccess, type);
ArrayUtils(m_context).retrieveLength(type);
m_context << Instruction::SWAP1 << Instruction::POP;
break;
case DataLocation::Memory:
m_context << Instruction::MLOAD;