1
0
Fork 0
mirror of https://github.com/pissnet/pissircd.git synced 2024-06-05 07:48:44 +01:00

Make Cmode_t an unsigned long long to have more chanmodes on 32 bit archs.

Reported by BlackBishop in https://bugs.unrealircd.org/view.php?id=6301
[skip ci]
This commit is contained in:
Bram Matthys 2023-07-11 15:25:21 +02:00
parent 767f5647cd
commit 9625a1221b
No known key found for this signature in database
GPG key ID: BF8116B163EAAE98
2 changed files with 4 additions and 3 deletions

View file

@ -189,7 +189,7 @@ typedef enum BypassChannelMessageRestrictionType {
#define EXSJ_MERGE 3 /**< SJOIN: Merging of modes, neither won nor lost */
/** Channel mode bit/value */
typedef unsigned long Cmode_t;
typedef unsigned long long Cmode_t;
typedef enum CmodeType {
CMODE_NORMAL=0,

View file

@ -333,11 +333,12 @@ Cmode *CmodeAdd(Module *module, CmodeInfo req, Cmode_t *mode)
if (!cm)
{
long l, found = 0;
unsigned long long l;
char found = 0;
if (req.type == CMODE_NORMAL)
{
for (l = 1; l < LONG_MAX/2; l *= 2)
for (l = 1; l < ULLONG_MAX/2; l *= 2)
{
found = 0;
for (cm=channelmodes; cm; cm = cm->next)