fixed a bug when no one votes for a menu
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40968
This commit is contained in:
parent
8335aab394
commit
35c13983df
@ -111,6 +111,7 @@ void VoteMenuHandler::EndVoting()
|
||||
unsigned int chosen = 0;
|
||||
unsigned int highest = 0;
|
||||
unsigned int dup_count = 0;
|
||||
unsigned int total = m_Votes.size() ? m_Votes[0] : 0;
|
||||
|
||||
/* If we got zero votes, take a shortcut. */
|
||||
if (m_NumVotes == 0)
|
||||
@ -126,7 +127,6 @@ void VoteMenuHandler::EndVoting()
|
||||
*/
|
||||
unsigned int dup_array[256];
|
||||
|
||||
unsigned int total = m_Votes[0];
|
||||
for (size_t i=1; i<m_Items; i++)
|
||||
{
|
||||
if (m_Votes[i] > m_Votes[highest])
|
||||
|
Loading…
Reference in New Issue
Block a user