]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Switch User::usertype back to an unsigned int.
authorMatt Schatz <genius3000@g3k.solutions>
Sat, 18 Apr 2020 05:13:00 +0000 (23:13 -0600)
committerMatt Schatz <genius3000@g3k.solutions>
Sun, 19 Apr 2020 11:01:04 +0000 (05:01 -0600)
Leaving it up to the compiler to set the underlying type of the enum
can result in this being a signed int. This variable will not work
as intended as a 2 bit signed int.
This fixes an issue with the Windows build(s) where a server trying
to link would fail with "Protocol violation: Invalid source".

include/users.h

index 4d7994e8ef995eb6527e454514b111301fcd4a59..b3afed688296004c0026da1841c1a85caad4ce84 100644 (file)
@@ -367,7 +367,7 @@ class CoreExport User : public Extensible
        unsigned int quitting:1;
 
        /** What type of user is this? */
-       const UserType usertype:2;
+       const unsigned int usertype:2;
 
        /** Get client IP string from sockaddr, using static internal buffer
         * @return The IP string