mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 11:09:04 -04:00
Fix not assigning bits to capabilities correctly.
This makes it correctly throw when the capability limit is reached and allows up to 64 capabilities to be created instead of 32.
This commit is contained in:
parent
bfefabfb0f
commit
0643ce085c
@ -78,9 +78,9 @@ class Cap::ManagerImpl : public Cap::Manager, public ReloadModule::EventListener
|
||||
used |= cap->GetMask();
|
||||
}
|
||||
|
||||
for (unsigned int i = 0; i < MAX_CAPS; i++)
|
||||
for (size_t i = 0; i < MAX_CAPS; i++)
|
||||
{
|
||||
Capability::Bit bit = (1 << i);
|
||||
Capability::Bit bit = (static_cast<Capability::Bit>(1) << i);
|
||||
if (!(used & bit))
|
||||
return bit;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user