Skip to content

Commit d417fe1

Browse files
authored
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)
1 parent b80f4ba commit d417fe1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/assembly.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ efficient code, for example:
108108
for
109109
{ let end := add(dataElementLocation, mul(len, 0x20)) }
110110
lt(dataElementLocation, end)
111-
{ data := add(dataElementLocation, 0x20) }
111+
{ dataElementLocation := add(dataElementLocation, 0x20) }
112112
{
113113
sum := add(sum, mload(dataElementLocation))
114114
}

0 commit comments

Comments
 (0)