From 0c79d92d5d2f216d15a619b09994ed97162c6dfc Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 19 Nov 2001 16:38:00 +0000 Subject: 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 --- src/fe-common/core/themes.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/fe-common') diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index 7e317fe6..6b88874e 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -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++; -- cgit v1.2.3