diff options
author | Timo Sirainen <cras@irssi.org> | 2001-03-24 16:03:05 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-03-24 16:03:05 +0000 |
commit | 7ed4e7ee7c2679ab775ae36a30bdd93e34ff67cb (patch) | |
tree | 7f85c6bed55f0681a30c6cd0f3e2e5e70473d039 /src/fe-common/core | |
parent | fa82a26cc63127440de3650d49c01822c0850f06 (diff) | |
download | irssi-7ed4e7ee7c2679ab775ae36a30bdd93e34ff67cb.zip |
don't crash with themes without replaces block. don't crash with themes with
highascii characters.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1422 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core')
-rw-r--r-- | src/fe-common/core/themes.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index ee053cd5..ac077d9d 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -161,7 +161,7 @@ static void theme_format_append_next(THEME_REC *theme, GString *str, int flags) { int index; - char chr; + unsigned char chr; chr = **format; if ((chr == '$' || chr == '%') && @@ -481,14 +481,14 @@ static void theme_read_replaces(CONFIG_REC *config, THEME_REC *theme) const char *p; int index; - node = config_node_traverse(config, "replaces", FALSE); - if (node == NULL || node->type != NODE_TYPE_BLOCK) return; - /* reset replace keys */ for (index = 0; index < 256; index++) theme->replace_keys[index] = -1; index = 0; + node = config_node_traverse(config, "replaces", FALSE); + if (node == NULL || node->type != NODE_TYPE_BLOCK) return; + for (tmp = node->value; tmp != NULL; tmp = tmp->next) { node = tmp->data; |