aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-07-21 20:09:17 +0800
committerGitHub <noreply@github.com>2017-07-21 20:09:17 +0800
commit05f4cc8e78d84f1a36e6bd6d22ca1bb888abc6af (patch)
treeede21661eb0ebacd53aa4a892630df4b02b1ee34
parent75b48616be23ab42db5a9c96a8d45bd3b4fc6ad6 (diff)
parent3dcbe68aeae9c6892e122988f6d2085d169ee3fb (diff)
downloaddexon-solidity-05f4cc8e78d84f1a36e6bd6d22ca1bb888abc6af.tar.gz
dexon-solidity-05f4cc8e78d84f1a36e6bd6d22ca1bb888abc6af.tar.zst
dexon-solidity-05f4cc8e78d84f1a36e6bd6d22ca1bb888abc6af.zip
Merge pull request #2615 from NIC619/develop
minor fix on assembly example
-rw-r--r--docs/assembly.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/assembly.rst b/docs/assembly.rst
index 855f5d72..4e665b7e 100644
--- a/docs/assembly.rst
+++ b/docs/assembly.rst
@@ -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))))
}
}
}