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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user