lowest is 0, typo...

This commit is contained in:
Anthony Calosa
2015-09-19 13:28:14 +08:00
parent c9d9d3d4d3
commit 64c6d19ae7

View File

@@ -217,7 +217,7 @@ void DeckMenu::selectRandomDeck(bool isAi)
vector<DeckMetaData *> *deckList = isAi ? deckManager->getAIDeckOrderList() : deckManager->getPlayerDeckOrderList();
//int random = (WRand() * 1000) % deckList->size();
int lowest=0, highest = deckList->size();
int range=(highest-lowest)+1;
int range=(highest-lowest);
int random = lowest+int(range*rand()/(RAND_MAX + 1.0));
selectDeck( random, isAi );
}