From d07daabd953403d2a0e7371e190f869fc4892b1d Mon Sep 17 00:00:00 2001 From: HyunggyuJang Date: Tue, 28 Mar 2023 10:05:03 +0900 Subject: [PATCH] Simplify & reduce gas consumption for toAddress Make it consistent with other toXXX variants --- contracts/BytesLib.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contracts/BytesLib.sol b/contracts/BytesLib.sol index 532897a..7fc940b 100644 --- a/contracts/BytesLib.sol +++ b/contracts/BytesLib.sol @@ -299,7 +299,7 @@ library BytesLib { address tempAddress; assembly { - tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000) + tempAddress := mload(add(add(_bytes, 0x14), _start)) } return tempAddress;