Skip to content

Commit 8e0e6d4

Browse files
committed
Correct memory concatenation final allocation
Fixes #7
1 parent 4912d14 commit 8e0e6d4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

contracts/BytesLib.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ library BytesLib {
4242
//allocating the array padded to 32 bytes like the compiler does now
4343
//make an additional check for a resulting zero-length array:
4444
// if (sub - end == 0) then end = end + 1
45-
mstore(0x40, and(add(add(end, iszero(sub(mc, end))), 31), not(31)))
45+
mstore(0x40, and(add(add(end, iszero(add(length, mload(_preBytes)))), 31), not(31)))
4646
}
4747

4848
return tempBytes;

0 commit comments

Comments
 (0)