From 93cf4dee666e01d6907c75c4018a701e5069daad Mon Sep 17 00:00:00 2001 From: Jim McDonald Date: Wed, 13 Dec 2017 07:55:46 +0000 Subject: Fixes for failing tests --- docs/solidity-by-example.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'docs/solidity-by-example.rst') diff --git a/docs/solidity-by-example.rst b/docs/solidity-by-example.rst index 6c01278a..b663083c 100644 --- a/docs/solidity-by-example.rst +++ b/docs/solidity-by-example.rst @@ -158,9 +158,9 @@ of votes. returns (uint winningProposal) { uint winningVoteCount = 0; - for (uint p = 0; p < winningProposals.length; p++) { - if (winningProposals[p].voteCount > winningVoteCount) { - winningVoteCount = winningProposals[p].voteCount; + for (uint p = 0; p < proposals.length; p++) { + if (proposals[p].voteCount > winningVoteCount) { + winningVoteCount = proposals[p].voteCount; winningProposal = p; } } @@ -172,7 +172,7 @@ of votes. function winnerName() public view returns (bytes32 winnerName) { - name = proposals[winningProposal()].name; + winnerName = proposals[winningProposal()].name; } } -- cgit