We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4912d14 commit 8e0e6d4Copy full SHA for 8e0e6d4
1 file changed
contracts/BytesLib.sol
@@ -42,7 +42,7 @@ library BytesLib {
42
//allocating the array padded to 32 bytes like the compiler does now
43
//make an additional check for a resulting zero-length array:
44
// if (sub - end == 0) then end = end + 1
45
- mstore(0x40, and(add(add(end, iszero(sub(mc, end))), 31), not(31)))
+ mstore(0x40, and(add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31)))
46
}
47
48
return tempBytes;
0 commit comments