diff --git a/packages/concordia-contracts/contracts/Voting.sol b/packages/concordia-contracts/contracts/Voting.sol index 129e4f6..b11d9b1 100644 --- a/packages/concordia-contracts/contracts/Voting.sol +++ b/packages/concordia-contracts/contracts/Voting.sol @@ -91,7 +91,7 @@ contract Voting { address[] memory voters = new address[](totalVotes); uint serializationIndex = 0; - for (uint pollOption = 1; pollOption < polls[topicID].numOptions; pollOption++) { + for (uint pollOption = 1; pollOption <= polls[topicID].numOptions; pollOption++) { address[] memory optionVoters = getVoters(topicID, pollOption); for (uint voteIndex = 0; voteIndex < voteCounts[pollOption - 1]; voteIndex++) { @@ -132,7 +132,7 @@ contract Voting { uint[] memory voteCounts = new uint[](polls[topicID].numOptions); - for (uint pollOption = 1; pollOption < polls[topicID].numOptions; pollOption++) { + for (uint pollOption = 1; pollOption <= polls[topicID].numOptions; pollOption++) { voteCounts[pollOption - 1] = getVoteCount(topicID, pollOption); } diff --git a/yarn.lock b/yarn.lock index 61b8ce3..957d618 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16493,9 +16493,6 @@ snake-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== - dependencies: - dot-case "^3.0.4" - tslib "^2.0.3" snapdragon-node@^2.0.1: version "2.1.1"