summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index dc6d17304..8b2c12ab6 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -516,9 +516,9 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri
// we MUST declare this wherever we use FOREACH_RESULT
int MOD_RESULT = 0;
- if (strlen(cname) > CHANMAX-1)
+ if (strlen(cname) > CHANMAX)
{
- cname[CHANMAX-1] = '\0';
+ cname[CHANMAX] = '\0';
}
log(DEBUG,"add_channel: %s %s",user->nick,cname);