mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
updated int assembly.rst (Sample program bug fix)
fixed for loop bug in VectorSum.sumPureAsm function at line 42 # updated { data := add(dataElementLocation, 0x20) } to -----> { dataElementLocation := add(dataElementLocation, 0x20) } in order to update dataElementLocation after every iteration. (Hence ending the loop)
This commit is contained in:
parent
b80f4baae2
commit
d417fe135f
@ -108,7 +108,7 @@ efficient code, for example:
|
||||
for
|
||||
{ let end := add(dataElementLocation, mul(len, 0x20)) }
|
||||
lt(dataElementLocation, end)
|
||||
{ data := add(dataElementLocation, 0x20) }
|
||||
{ dataElementLocation := add(dataElementLocation, 0x20) }
|
||||
{
|
||||
sum := add(sum, mload(dataElementLocation))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user