mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Move init/cond into the for loop
This commit is contained in:
parent
a323486a9b
commit
34503d98d7
@ -106,13 +106,13 @@ you really know what you are doing.
|
||||
// Skip over the length field.
|
||||
_data := add(_data, 0x20)
|
||||
|
||||
// Set up a bound.
|
||||
let end := add(_data, len)
|
||||
|
||||
// Iterate until the bound is not met.
|
||||
for {} lt(_data, end) {} {
|
||||
for
|
||||
{ let end := add(_data, len) }
|
||||
lt(_data, end)
|
||||
{ _data := add(_data, 0x20) }
|
||||
{
|
||||
o_sum := add(o_sum, mload(_data))
|
||||
_data := add(_data, 0x20)
|
||||
}
|
||||
|
||||
// NOTE: after this point it is not safe to use _data in Solidity code
|
||||
|
Loading…
Reference in New Issue
Block a user