aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/sessionmanager.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index db32a0bc..e1f1a802 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -111,7 +111,7 @@ end
function make_authenticated(session, username)
username = nodeprep(username);
- if not username and #username > 0 then return nil, "Invalid username"; end
+ if not username or #username == 0 then return nil, "Invalid username"; end
session.username = username;
if session.type == "c2s_unauthed" then
session.type = "c2s";