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
This commit is contained in:
Timo Sirainen 2002-02-17 09:37:23 +00:00 committed by cras
commit 490e411814
2 changed files with 5 additions and 1 deletions

View file

@ -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));