Skip to content

Commit

Permalink
assembly
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptoryda committed Feb 19, 2024
1 parent 5a1f671 commit 18f26d0
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,13 @@ library BytesUtils {

function memcpy(uint256 dest, uint256 src, uint256 len) private pure {
assembly {
mcopy(dest, src, len)
for {
let i := 0
} lt(i, len) {
i := add(i, 32)
} {
mstore(add(dest, i), mload(add(src, i)))
}
}
}

Expand Down

0 comments on commit 18f26d0

Please sign in to comment.