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:
Femi Bolaji 2022-06-17 10:48:48 +01:00 committed by GitHub
parent b80f4baae2
commit d417fe135f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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))
}