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 <[email protected]>
  • Loading branch information
mdtanrikulu and Arachnid authored Nov 15, 2024
1 parent 7654735 commit 4630340
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 @@ -207,13 +207,11 @@ contract OffchainDNSResolver is IExtendedResolver, IERC165 {
}

bytes memory result = new bytes(totalLength);
idx = startIdx;
uint256 resultIdx = 0;
while (idx < lastIdx) {
for (uint256 idx = startIdx; idx < lastIdx; idx += fieldLength + 1) {
uint256 fieldLength = data.readUint8(idx);
result.strcpy(resultIdx, data, idx + 1, fieldLength);
resultIdx += fieldLength;
idx += fieldLength + 1;
}
return result;
}
Expand Down

0 comments on commit 4630340

Please sign in to comment.