Skip to content

Commit

Permalink
Fix bytesMemoryToAddress (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Feb 20, 2024
1 parent 953c05e commit 4cfbbfe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions contracts/BytesHelperLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ library BytesHelperLib {
bytes memory data,
uint256 offset
) internal pure returns (address output) {
bytes memory b = new bytes(20);
for (uint256 i = 0; i < 20; i++) {
b[i] = data[i + offset];
}
assembly {
output := mload(add(b, 20))
output := mload(add(add(data, offset), 32))
}
}

Expand Down

0 comments on commit 4cfbbfe

Please sign in to comment.