Commit aabe5168 authored by Annie Ke's avatar Annie Ke Committed by Kelvin Fichter
parent aac58896
......@@ -592,6 +592,7 @@ library Lib_RLPReader {
}
// Pick out the remaining bytes.
unchecked {
uint256 mask = 256 ** (32 - (_length % 32)) - 1;
assembly {
mstore(
......@@ -605,6 +606,7 @@ library Lib_RLPReader {
return out;
}
}
/**
* Copies an RLP item into bytes.
......
......@@ -228,6 +228,7 @@ library Lib_RLPWriter {
src += 32;
}
unchecked {
uint256 mask = 256 ** (32 - len) - 1;
assembly {
let srcpart := and(mload(src), not(mask))
......@@ -235,6 +236,7 @@ library Lib_RLPWriter {
mstore(dest, or(destpart, srcpart))
}
}
}
/**
* Flattens a list of byte strings into one byte string.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment