diff options
author | Timo Sirainen <cras@irssi.org> | 2002-02-22 12:56:24 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-02-22 12:56:24 +0000 |
commit | dd65d300b02d6e273a6fc515f1f768775b398acd (patch) | |
tree | 3809b80a6e4054ce1ff6a7a4176b6c6de7cff825 | |
parent | 911f69dc3ae5dc902d78ef2c1e8000f297dbbacc (diff) | |
download | irssi-dd65d300b02d6e273a6fc515f1f768775b398acd.zip |
Highascii chars in replaces block in theme files could have crashed irssi.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2524 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-common/core/themes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index 514dd377..45a1f2e8 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -221,7 +221,7 @@ static void theme_format_append_next(THEME_REC *theme, GString *str, } index = (flags & EXPAND_FLAG_IGNORE_REPLACES) ? -1 : - theme->replace_keys[(int) chr]; + theme->replace_keys[(int) (unsigned char) chr]; if (index == -1) g_string_append_c(str, chr); else { @@ -542,7 +542,7 @@ static void theme_read_replaces(CONFIG_REC *config, THEME_REC *theme) if (node->key != NULL && node->value != NULL) { for (p = node->key; *p != '\0'; p++) - theme->replace_keys[(int) *p] = index; + theme->replace_keys[(int) (unsigned char) *p] = index; theme->replace_values = g_slist_append(theme->replace_values, |