Fix priority handling with duplicate values

Having duplicate values in priority string caused platform/language to be set to wrong value
For example --platform 1 --platform-priority 4,1,1 caused platform to be set to 6 instead of 5
This commit is contained in:
Sude 2015-08-29 14:22:18 +03:00
parent f9c15dfaca
commit f992466ddf

View File

@ -44,7 +44,7 @@ void handle_priority(const std::string &what, const std::string &priority_string
#endif
for (std::vector<unsigned int>::iterator it = priority.begin(); it != priority.end(); it++)
{
wanted += *it;
wanted |= *it;
#ifdef DEBUG
std::cerr << *it << " ";
#endif