summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-17 09:37:23 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-17 09:37:23 +0000
commit490e411814ff8cc5c4c9d26bf7987cd7254fa06a (patch)
tree3899ffd1f2b8c42258832800c09f814b8f182c7b /src/fe-common
parent81c2e557d18844a1e73e222c57851316fb85a359 (diff)
downloadirssi-490e411814ff8cc5c4c9d26bf7987cd7254fa06a.zip
Don't crash if special vars line ends with '$'.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2488 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/themes.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c
index f1b871b2..514dd377 100644
--- a/src/fe-common/core/themes.c
+++ b/src/fe-common/core/themes.c
@@ -146,7 +146,9 @@ static void theme_format_append_variable(GString *str, const char **format)
value = parse_special((char **) format, NULL, NULL,
args, &free_ret, NULL, PARSE_FLAG_ONLY_ARGS);
if (free_ret) g_free(value);
- (*format)++;
+
+ if (**format != '\0')
+ (*format)++;
/* append the variable name */
value = g_strndup(orig, (int) (*format-orig));