minor fix on assembly example

This commit is contained in:
NIC619 2017-07-21 00:25:36 -04:00
parent d70974ea7c
commit 3dcbe68aea

View File

@ -92,7 +92,7 @@ you really know what you are doing.
function sumAsm(uint[] _data) returns (uint o_sum) {
for (uint i = 0; i < _data.length; ++i) {
assembly {
o_sum := mload(add(add(_data, 0x20), mul(i, 0x20)))
o_sum := add(o_sum, mload(add(add(_data, 0x20), mul(i, 0x20))))
}
}
}