summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-05-14 14:26:46 +0100
committerSadie Powell <sadie@witchery.services>2021-05-14 14:26:46 +0100
commitc24a7435b8171db15c719af119e708bfd9b719bc (patch)
tree54fd9b8ced9f599f6d0ab5d67137a97131b8222c /include
parent4350a11c663b0d75f8119743bffb7736d87abd4d (diff)
Fix an off by one error in various bitsets.
Diffstat (limited to 'include')
-rw-r--r--include/modules/who.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/modules/who.h b/include/modules/who.h
index 36aecbc03..d5fcba977 100644
--- a/include/modules/who.h
+++ b/include/modules/who.h
@@ -51,8 +51,10 @@ class Who::EventListener : public Events::ModuleEventListener
class Who::Request
{
public:
+ typedef std::bitset<UCHAR_MAX + 1> CharState;
+
/** The flags for matching users to include. */
- std::bitset<UCHAR_MAX> flags;
+ CharState flags;
/** Whether we are matching using a wildcard or a flag. */
bool fuzzy_match;
@@ -67,7 +69,7 @@ class Who::Request
bool whox;
/** The fields to include in the WHOX response. */
- std::bitset<UCHAR_MAX> whox_fields;
+ CharState whox_fields;
/** A user specified label for the WHOX response. */
std::string whox_querytype;