diff options
author | Sadie Powell <sadie@witchery.services> | 2021-05-14 14:26:46 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-05-14 14:26:46 +0100 |
commit | c24a7435b8171db15c719af119e708bfd9b719bc (patch) | |
tree | 54fd9b8ced9f599f6d0ab5d67137a97131b8222c /src/modules | |
parent | 4350a11c663b0d75f8119743bffb7736d87abd4d (diff) |
Fix an off by one error in various bitsets.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_anticaps.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_blockcaps.cpp | 4 | ||||
-rw-r--r-- | src/modules/m_chghost.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_hostchange.cpp | 2 | ||||
-rw-r--r-- | src/modules/m_sethost.cpp | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/src/modules/m_anticaps.cpp b/src/modules/m_anticaps.cpp index 2c39dce98..8b6cd50f5 100644 --- a/src/modules/m_anticaps.cpp +++ b/src/modules/m_anticaps.cpp @@ -158,8 +158,8 @@ class ModuleAntiCaps : public Module { private: CheckExemption::EventProvider exemptionprov; - std::bitset<UCHAR_MAX> uppercase; - std::bitset<UCHAR_MAX> lowercase; + std::bitset<UCHAR_MAX + 1> uppercase; + std::bitset<UCHAR_MAX + 1> lowercase; AntiCapsMode mode; void CreateBan(Channel* channel, User* user, bool mute) diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index 3bf9c98d0..c79ff15f5 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -34,8 +34,8 @@ class ModuleBlockCAPS : public Module SimpleChannelModeHandler bc; unsigned int percent; unsigned int minlen; - std::bitset<UCHAR_MAX> lowercase; - std::bitset<UCHAR_MAX> uppercase; + std::bitset<UCHAR_MAX + 1> lowercase; + std::bitset<UCHAR_MAX + 1> uppercase; public: ModuleBlockCAPS() diff --git a/src/modules/m_chghost.cpp b/src/modules/m_chghost.cpp index d8f306699..45709fa44 100644 --- a/src/modules/m_chghost.cpp +++ b/src/modules/m_chghost.cpp @@ -30,7 +30,7 @@ class CommandChghost : public Command { public: - std::bitset<UCHAR_MAX> hostmap; + std::bitset<UCHAR_MAX + 1> hostmap; CommandChghost(Module* Creator) : Command(Creator,"CHGHOST", 2) diff --git a/src/modules/m_hostchange.cpp b/src/modules/m_hostchange.cpp index 47c831d29..56ea337fd 100644 --- a/src/modules/m_hostchange.cpp +++ b/src/modules/m_hostchange.cpp @@ -106,7 +106,7 @@ typedef std::vector<HostRule> HostRules; class ModuleHostChange : public Module { private: - std::bitset<UCHAR_MAX> hostmap; + std::bitset<UCHAR_MAX + 1> hostmap; HostRules hostrules; std::string CleanName(const std::string& name) diff --git a/src/modules/m_sethost.cpp b/src/modules/m_sethost.cpp index 98067b459..18c964d1b 100644 --- a/src/modules/m_sethost.cpp +++ b/src/modules/m_sethost.cpp @@ -30,7 +30,7 @@ class CommandSethost : public Command { public: - std::bitset<UCHAR_MAX> hostmap; + std::bitset<UCHAR_MAX + 1> hostmap; CommandSethost(Module* Creator) : Command(Creator,"SETHOST", 1) |