Bugfix in calldata unpacker.

The offset was not specified correctly if memory activity preceded the
unpacker.
This commit is contained in:
chriseth
2015-10-01 16:50:11 +02:00
parent 5f6c3cdf54
commit 6161ec96ff
4 changed files with 47 additions and 34 deletions
+2 -6
View File
@@ -85,12 +85,8 @@ private:
void appendFunctionSelector(ContractDefinition const& _contract);
/// Creates code that unpacks the arguments for the given function represented by a vector of TypePointers.
/// From memory if @a _fromMemory is true, otherwise from call data.
/// Expects source offset on the stack.
void appendCalldataUnpacker(
TypePointers const& _typeParameters,
bool _fromMemory = false,
u256 _startOffset = u256(-1)
);
/// Expects source offset on the stack, which is removed.
void appendCalldataUnpacker(TypePointers const& _typeParameters, bool _fromMemory = false);
void appendReturnValuePacker(TypePointers const& _typeParameters);
void registerStateVariables(ContractDefinition const& _contract);