diff --git a/src/core/lib/ConsiderationDecoder.sol b/src/core/lib/ConsiderationDecoder.sol index 5655205..0c493b7 100644 --- a/src/core/lib/ConsiderationDecoder.sol +++ b/src/core/lib/ConsiderationDecoder.sol @@ -26,7 +26,7 @@ import { Common_identifier_offset, Common_token_offset, ConsiderationItem_recipient_offset, - ConsiderationItem_size_with_length, + ConsiderationItem_size_with_head_pointer, ConsiderationItem_size, CriteriaResolver_criteriaProof_offset, CriteriaResolver_fixed_segment_0, @@ -1117,7 +1117,10 @@ contract ConsiderationDecoder { mPtrLength, add( OneWord, - mul(newLength, ConsiderationItem_size_with_length) + mul( + newLength, + ConsiderationItem_size_with_head_pointer + ) ) ) ) diff --git a/src/core/lib/FulfillmentApplier.sol b/src/core/lib/FulfillmentApplier.sol index 3e30733..405e230 100644 --- a/src/core/lib/FulfillmentApplier.sol +++ b/src/core/lib/FulfillmentApplier.sol @@ -326,7 +326,7 @@ contract FulfillmentApplier is FulfillmentApplicationErrors { // Create variable to track position in offerComponents head. let fulfillmentHeadPtr := offerComponents - // Get position one word past last element in head of array. + // Get position of the last element in head of array. let endPtr := add( offerComponents, shl(OneWordShift, mload(offerComponents)) @@ -589,7 +589,7 @@ contract FulfillmentApplier is FulfillmentApplicationErrors { // Track position in considerationComponents head. let fulfillmentHeadPtr := considerationComponents - // Get position one word past last element in head of array. + // Get position of the last element in head of array. let endPtr := add( considerationComponents, diff --git a/src/types/lib/ConsiderationConstants.sol b/src/types/lib/ConsiderationConstants.sol index 3b6c312..0e0fce3 100644 --- a/src/types/lib/ConsiderationConstants.sol +++ b/src/types/lib/ConsiderationConstants.sol @@ -96,7 +96,7 @@ uint256 constant ReceivedItem_recipient_offset = 0x80; uint256 constant ReceivedItem_CommonParams_size = 0x60; uint256 constant ConsiderationItem_size = 0xc0; -uint256 constant ConsiderationItem_size_with_length = 0xe0; +uint256 constant ConsiderationItem_size_with_head_pointer = 0xe0; uint256 constant ConsiderationItem_recipient_offset = 0xa0; // Store the same constant in an abbreviated format for a line length fix.