This commit is contained in:
chriseth 2016-06-01 23:40:38 +02:00
parent f9c8a9b5ca
commit ed9cc5476e

View File

@ -112,9 +112,11 @@ of votes.
// In this case, the delegation will not be executed, // In this case, the delegation will not be executed,
// but in other situations, such loops might // but in other situations, such loops might
// cause a contract to get "stuck" completely. // cause a contract to get "stuck" completely.
while (voters[to].delegate != address(0) && while (
voters[to].delegate != msg.sender) { voters[to].delegate != address(0) &&
to = voters[to].delegate; voters[to].delegate != msg.sender
) {
to = voters[to].delegate;
} }
// We found a loop in the delegation, not allowed. // We found a loop in the delegation, not allowed.