diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-02 01:10:31 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-02 01:10:31 +0000 |
commit | da40ff67132a7b7a9812080e73423b171703c304 (patch) | |
tree | 1915499651a078781f181cc7ccccc46d90d35e26 /src/message.cpp | |
parent | 1c43dbae9114bfaf3152809628b030ce6e341c01 (diff) |
Fixed weird line wrapping bug with extremely long lines
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1277 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/message.cpp')
-rw-r--r-- | src/message.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/message.cpp b/src/message.cpp index 4b2dfa98d..c90793090 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -187,11 +187,12 @@ void chop(char* str) FOREACH_MOD OnServerRaw(temp,false,NULL); const char* str2 = temp.c_str(); snprintf(str,MAXBUF,"%s",str2); - if (strlen(str) >= 512) + if (strlen(str) >= 511) { - str[509] = '\r'; - str[510] = '\n'; - str[511] = '\0'; + str[510] = '\r'; + str[511] = '\n'; + str[512] = '\0'; + log(DEBUG,"Excess line chopped."); } } |