From 3ed1cc27b13fc8790b99f97c49cf8167236afe03 Mon Sep 17 00:00:00 2001 From: Matt Schatz Date: Fri, 17 Apr 2020 23:13:00 -0600 Subject: Switch User::usertype back to an unsigned int. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/users.h') diff --git a/include/users.h b/include/users.h index 4d7994e8e..b3afed688 100644 --- a/include/users.h +++ b/include/users.h @@ -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 -- cgit v1.2.3