diff options
Diffstat (limited to 'common/rfb/SConnection.cxx')
-rw-r--r-- | common/rfb/SConnection.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/rfb/SConnection.cxx b/common/rfb/SConnection.cxx index d7633d26..f70d21dc 100644 --- a/common/rfb/SConnection.cxx +++ b/common/rfb/SConnection.cxx @@ -23,6 +23,7 @@ #include <stdio.h> #include <string.h> +#include <assert.h> #include <rfb/Exception.h> #include <rfb/Security.h> #include <rfb/clipboardTypes.h> @@ -346,6 +347,8 @@ void SConnection::setAccessRights(AccessRights ar) bool SConnection::accessCheck(AccessRights ar) const { + assert(state_ >= RFBSTATE_QUERYING); + return (accessRights & ar) == ar; } |