Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/libraries/BitmapUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,9 @@ library BitmapUtils {
function orderedBytesArrayToBitmap(bytes memory orderedBytesArray, uint8 bitUpperBound) internal pure returns (uint256) {
uint256 bitmap = orderedBytesArrayToBitmap(orderedBytesArray);

if (bitmap != 0) {
require(
uint8(orderedBytesArray[orderedBytesArray.length - 1]) < bitUpperBound,
"BitmapUtils.orderedBytesArrayToBitmap: bitmap exceeds max value"
);
}
require((1 << bitUpperBound) > bitmap,
"BitmapUtils.orderedBytesArrayToBitmap: bitmap exceeds max value"
);

return bitmap;
}
Expand Down