mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2968 from ethereum/calldataencodedsize
Add some asserts about calldata encoded size.
This commit is contained in:
commit
11c51de5b9
@ -291,8 +291,11 @@ void ArrayUtils::copyArrayToMemory(ArrayType const& _sourceType, bool _padToWord
|
|||||||
CompilerUtils utils(m_context);
|
CompilerUtils utils(m_context);
|
||||||
unsigned baseSize = 1;
|
unsigned baseSize = 1;
|
||||||
if (!_sourceType.isByteArray())
|
if (!_sourceType.isByteArray())
|
||||||
|
{
|
||||||
// We always pad the elements, regardless of _padToWordBoundaries.
|
// We always pad the elements, regardless of _padToWordBoundaries.
|
||||||
baseSize = _sourceType.baseType()->calldataEncodedSize();
|
baseSize = _sourceType.baseType()->calldataEncodedSize();
|
||||||
|
solAssert(baseSize >= 0x20, "");
|
||||||
|
}
|
||||||
|
|
||||||
if (_sourceType.location() == DataLocation::CallData)
|
if (_sourceType.location() == DataLocation::CallData)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user