Increase size of buffer to handle maximum-length topics in status_topic().

This affects the maximum length of the topic that can be displayed by the %-
status format.  No topic can be longer than IRCD_BUFFER_SIZE, so use that.

Reported by oxy.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@508 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2014-10-14 12:57:01 +00:00
parent 8fde6f8248
commit c41048b896
2 changed files with 6 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2c01]
* Allow %- status format to handle max-length topics (reported by oxy). (caf)
* Add /FSET WOHIS_LOGGEDIN for services login info on hybrid, ratbox and
ircu. (caf)

View File

@@ -1301,7 +1301,8 @@ static char my_buffer[MY_BUFFER/2+1];
static char *status_topic (Window *window)
{
static char my_buffer[MY_BUFFER+41];
static char my_buffer[IRCD_BUFFER_SIZE];
if (window && window->current_channel && window->wset->topic_format)
{
ChannelList *chan;
@@ -1315,11 +1316,11 @@ static char my_buffer[MY_BUFFER+41];
double_quote(t, "()[]$\"", t2);
else
strcpy(t2, t);
snprintf(my_buffer, MY_BUFFER, window->wset->topic_format, stripansicodes(t2));
snprintf(my_buffer, sizeof my_buffer, window->wset->topic_format, stripansicodes(t2));
}
else
strlcpy(my_buffer, "No Topic", sizeof my_buffer);
return(my_buffer);
return my_buffer;
}
}
RETURN_EMPTY;