summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/register.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mbbsd/register.c b/mbbsd/register.c
index df6fa4eb..ff714ff6 100644
--- a/mbbsd/register.c
+++ b/mbbsd/register.c
@@ -1029,7 +1029,7 @@ check_register(void)
if (buf[0] == '#')
{
xun = atoi(buf+1);
- if (xun < 0 || xun >= MAX_USERS ||
+ if (xun <= 0 || xun > MAX_USERS ||
passwd_sync_query(xun, &u) < 0 ||
!(u.userlevel & (PERM_ACCOUNTS | PERM_ACCTREG)))
memset(&u, 0, sizeof(u));