Skip to content

Commit

Permalink
more consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Amxx committed Nov 27, 2024
1 parent 7152220 commit abe20df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion contracts/governance/Governor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ abstract contract Governor is Context, ERC165, EIP712, Nonces, IGovernor, IERC72
function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {
// This is not memory safe in the general case, but all calls to this private function are within bounds.
assembly ("memory-safe") {
value := mload(add(buffer, add(0x20, offset)))
value := mload(add(add(buffer, 0x20), offset))
}
}
}
4 changes: 2 additions & 2 deletions contracts/utils/Bytes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ library Bytes {
// allocate and copy
bytes memory result = new bytes(end - start);
assembly ("memory-safe") {
mcopy(add(result, 0x20), add(buffer, add(start, 0x20)), sub(end, start))
mcopy(add(result, 0x20), add(add(buffer, 0x20), start), sub(end, start))
}

return result;
Expand All @@ -107,7 +107,7 @@ library Bytes {
function _unsafeReadBytesOffset(bytes memory buffer, uint256 offset) private pure returns (bytes32 value) {
// This is not memory safe in the general case, but all calls to this private function are within bounds.
assembly ("memory-safe") {
value := mload(add(buffer, add(0x20, offset)))
value := mload(add(add(buffer, 0x20), offset))
}
}
}

0 comments on commit abe20df

Please sign in to comment.