From c24a7435b8171db15c719af119e708bfd9b719bc Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 14 May 2021 14:26:46 +0100 Subject: Fix an off by one error in various bitsets. --- src/coremods/core_who.cpp | 2 +- src/modules/m_anticaps.cpp | 4 ++-- src/modules/m_blockcaps.cpp | 4 ++-- src/modules/m_chghost.cpp | 2 +- src/modules/m_hostchange.cpp | 2 +- src/modules/m_sethost.cpp | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/coremods/core_who.cpp b/src/coremods/core_who.cpp index aa19efe97..b853ef4b1 100644 --- a/src/coremods/core_who.cpp +++ b/src/coremods/core_who.cpp @@ -80,7 +80,7 @@ struct WhoData : public Who::Request // If flags have been specified by the source. if (parameters.size() > 1) { - std::bitset* current_bitset = &flags; + CharState* current_bitset = &flags; for (std::string::const_iterator iter = parameters[1].begin(); iter != parameters[1].end(); ++iter) { unsigned char chr = static_cast(*iter); 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 uppercase; - std::bitset lowercase; + std::bitset uppercase; + std::bitset 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 lowercase; - std::bitset uppercase; + std::bitset lowercase; + std::bitset 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 hostmap; + std::bitset 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 HostRules; class ModuleHostChange : public Module { private: - std::bitset hostmap; + std::bitset 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 hostmap; + std::bitset hostmap; CommandSethost(Module* Creator) : Command(Creator,"SETHOST", 1) -- cgit v1.2.3