Skip to content

Commit

Permalink
Update contracts/dnsregistrar/OffchainDNSResolver.sol
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Johnson <arachnid@notdot.net>
  • Loading branch information
mdtanrikulu and Arachnid authored Nov 15, 2024
1 parent db8a085 commit 7654735
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions contracts/dnsregistrar/OffchainDNSResolver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,9 @@ contract OffchainDNSResolver is IExtendedResolver, IERC165 {
uint256 lastIdx
) internal pure returns (bytes memory) {
uint256 totalLength = 0;
uint256 idx = startIdx;
while (idx < lastIdx) {
for (uint256 idx = startidx; idx < lastIdx; idx += fieldLength + 1) {
uint256 fieldLength = data.readUint8(idx);
totalLength += fieldLength;
idx += fieldLength + 1;
}

bytes memory result = new bytes(totalLength);
Expand Down

0 comments on commit 7654735

Please # to comment.