Fix #13513, ec492cb267: std::numeric_limits<CompanyMask> not working causes no vehicles to exist
std::numeric_limits<T>::max() returns 0 instead of an error when the type is unknown. Solve it by implementing and using Set() and All() in BaseBitSet in same way as std::bitset.
This commit is contained in:
@@ -627,7 +627,7 @@ static void CompanyCheckBankrupt(Company *c)
|
||||
* is no THE-END, otherwise mark the client as spectator to make sure
|
||||
* they are no longer in control of this company. However... when you
|
||||
* join another company (cheat) the "unowned" company can bankrupt. */
|
||||
c->bankrupt_asked = std::numeric_limits<CompanyMask>::max();
|
||||
c->bankrupt_asked.Set();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user