1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

data_is_empty() didn't check properly for $0-$9 variables and broke

statusbar.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2086 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-19 16:38:00 +00:00 committed by cras
parent d56ed85d91
commit 0c79d92d5d

View File

@ -238,6 +238,12 @@ static void theme_format_append_next(THEME_REC *theme, GString *str,
/* returns TRUE if data is empty, or the data is a $variable which is empty */
static int data_is_empty(const char **data)
{
/* since we don't know the real argument list, assume there's always
an argument in them */
char *arglist[] = {
"x", "x", "x", "x", "x", "x","x", "x", "x", "x",
NULL
};
const char *p;
char *ret;
int free_ret, empty;
@ -259,7 +265,7 @@ static int data_is_empty(const char **data)
/* variable - check if it's empty */
p++;
ret = parse_special((char **) &p, active_win->active_server,
active_win->active, NULL, &free_ret, NULL, 0);
active_win->active, arglist, &free_ret, NULL, 0);
p++;
while (*p == ' ') p++;